diff --git a/packages/core/src/backend/servers/http/core.ts b/packages/core/src/backend/servers/http/core.ts index 17b312e..62b7ea1 100644 --- a/packages/core/src/backend/servers/http/core.ts +++ b/packages/core/src/backend/servers/http/core.ts @@ -4,7 +4,7 @@ import {constants} from 'http2'; import * as v from 'valibot'; import { AllowedMiddlewareSpecification, - BackendState, getAllowString, + BackendState, Middleware, RequestContext, RequestDecorator, diff --git a/packages/core/src/common/language.ts b/packages/core/src/common/language.ts index 698db74..8e67309 100644 --- a/packages/core/src/common/language.ts +++ b/packages/core/src/common/language.ts @@ -30,6 +30,7 @@ export const LANGUAGE_DEFAULT_ERROR_STATUS_MESSAGE_KEYS = [ 'invalidResource', 'notImplemented', 'internalServerError', + 'resourceNotFound', ] as const; export const LANGUAGE_DEFAULT_STATUS_MESSAGE_KEYS = [ @@ -37,7 +38,6 @@ export const LANGUAGE_DEFAULT_STATUS_MESSAGE_KEYS = [ 'ok', 'resourceCollectionFetched', 'resourceFetched', - 'resourceNotFound', 'resourceDeleted', 'resourcePatched', 'resourceCreated', @@ -328,5 +328,13 @@ export const FALLBACK_LANGUAGE = { 'Contact the administrator regarding missing configuration or unavailability of dependencies.', ], ], + resourceNotFound: [ + 'The resource in the provided URL could not be found.', + [ + 'Check if the request URL is correct.', + 'Try the request again at a later time.', + 'Contact the administrator regarding missing configuration or unavailability of dependencies.', + ], + ], }, } satisfies Language; diff --git a/packages/core/test/utils.ts b/packages/core/test/utils.ts index 4c8003a..f328b1e 100644 --- a/packages/core/test/utils.ts +++ b/packages/core/test/utils.ts @@ -461,5 +461,13 @@ export const TEST_LANGUAGE: Language = { 'Contact the administrator regarding missing configuration or unavailability of dependencies.', ], ], + resourceNotFound: [ + 'The resource in the provided URL could not be found.', + [ + 'Check if the request URL is correct.', + 'Try the request again at a later time.', + 'Contact the administrator regarding missing configuration or unavailability of dependencies.', + ], + ], }, }; diff --git a/packages/examples/cms-web-api/bruno/Get Single Post.bru b/packages/examples/cms-web-api/bruno/Get Single Post.bru index ef36066..246f00b 100644 --- a/packages/examples/cms-web-api/bruno/Get Single Post.bru +++ b/packages/examples/cms-web-api/bruno/Get Single Post.bru @@ -5,7 +5,7 @@ meta { } get { - url: http://localhost:6969/api/posts/5fac64d6-d261-42bb-a67b-bc7e1955a7e2 + url: http://localhost:6969/api/posts/9ba60691-0cd3-4e8a-9f44-e92b19fcacbc body: none auth: none }