🐛 Fixed 500 error for content with no collection
no issue - Fixes a case where a post that doesn't belong to a collection throws a 500 Resource Not Found Error - This should be a 404 Resource Not Found error - 500 suggests something went very wrong and is our fault, - but this is a user error where the collections or posts are misconfigured, and some content doesn't have a home
This commit is contained in:
parent
846a94728f
commit
a1f0169edf
@ -137,7 +137,7 @@ class UrlService {
|
||||
const object = this.urls.getByResourceId(resourceId);
|
||||
|
||||
if (!object) {
|
||||
throw new common.errors.InternalServerError({
|
||||
throw new common.errors.NotFoundError({
|
||||
message: 'Resource not found.',
|
||||
code: 'URLSERVICE_RESOURCE_NOT_FOUND'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user