mirror of
https://github.com/arthur-pbty/portfolio2023.git
synced 2026-06-03 23:36:21 +02:00
111 lines
4.6 KiB
JSON
111 lines
4.6 KiB
JSON
{
|
|
"E_CANNOT_LOOKUP_ROUTE": {
|
|
"message": "Cannot find route for \"{{ identifier }}\" identifier",
|
|
"code": "E_CANNOT_FIND_ROUTE",
|
|
"status": 500,
|
|
"help": [
|
|
"When making URL for a route. You can use one of the following identifiers",
|
|
"- The route name. Defined using `Route.as()`",
|
|
"- The route controller.method name. `PostsController.show`"
|
|
]
|
|
},
|
|
"E_CANNOT_LOOKUP_DOMAIN": {
|
|
"message": "Cannot find routes for \"{{ domain }}\" domain",
|
|
"code": "E_CANNOT_FIND_ROUTE_DOMAIN",
|
|
"status": 500,
|
|
"help": [
|
|
"When making routes for a domain. Make sure",
|
|
"- You pass in the domain pattern and not the actual URL",
|
|
"- The domain pattern should be defined inside the routes file"
|
|
]
|
|
},
|
|
"E_CANNOT_SERIALIZE_RESPONSE_BODY": {
|
|
"message": "Unable to send HTTP response. Cannot serialize \"{{ dataType }}\" to a string",
|
|
"code": "E_CANNOT_SERIALIZE_RESPONSE_BODY",
|
|
"status": 500,
|
|
"help": [
|
|
"AdonisJS can only send following data types as a response",
|
|
"- object, array, number, boolean, date, buffer and string",
|
|
"- For sending streams, you must use `response.stream` method",
|
|
"- For downloading files, you must use `response.download` method"
|
|
]
|
|
},
|
|
"E_HTTP_EXCEPTION": {
|
|
"message": "Request aborted with status code {{ status }}",
|
|
"code": "E_HTTP_EXCEPTION",
|
|
"help": ["A generic exception usually raised using \"response.abort\""]
|
|
},
|
|
"E_CANNOT_DEFINE_GROUP_NAME": {
|
|
"message": "All the routes inside a group must have names before calling \"Route.group.as\"",
|
|
"code": "E_CANNOT_DEFINE_GROUP_NAME",
|
|
"status": 500,
|
|
"help": [
|
|
"`Route.group.as` adds a prefix to the route names and hence it cannot prefix a route with no initial name",
|
|
"To fix the issue, you must give name to all the routes inside a group"
|
|
]
|
|
},
|
|
"E_DUPLICATE_ROUTE_NAME": {
|
|
"message": "Duplicate route name \"{{ name }}\"",
|
|
"code": "E_DUPLICATE_ROUTE_NAME",
|
|
"status": 500,
|
|
"help": [
|
|
"Names are assigned to the routes to identify them uniquely and hence a duplicate name is not allowed",
|
|
"Run `node ace list:routes` to find the route using this name"
|
|
]
|
|
},
|
|
"E_DUPLICATE_ROUTE": {
|
|
"message": "Duplicate route \"{{ method }}:{{ pattern }}\"",
|
|
"code": "E_DUPLICATE_ROUTE",
|
|
"status": 500,
|
|
"help": [
|
|
"The route with the pattern is already registered",
|
|
"Double check your routes file or run `node ace list:routes`"
|
|
]
|
|
},
|
|
"E_DUPLICATE_ROUTE_PARAM": {
|
|
"message": "The \"{{ param }}\" param is mentioned twice in the route pattern \"{{ pattern }}\"",
|
|
"code": "E_DUPLICATE_ROUTE_PARAM",
|
|
"status": 500
|
|
},
|
|
"E_ROUTE_NOT_FOUND": {
|
|
"message": "Cannot {{ method }}:{{ url }}",
|
|
"code": "E_ROUTE_NOT_FOUND",
|
|
"status": 404
|
|
},
|
|
"E_MISSING_NAMED_MIDDLEWARE": {
|
|
"message": "Cannot find a middleware named \"{{ name }}\"",
|
|
"code": "E_MISSING_NAMED_MIDDLEWARE",
|
|
"status": 500,
|
|
"help": [
|
|
"The named middleware are supposed to be registered inside `start/kernel` file first",
|
|
"Open the file and make sure middleware is defined inside `Server.middleware.registerNamed()` call"
|
|
]
|
|
},
|
|
"E_CANNOT_MAKE_ROUTE_URL": {
|
|
"message": "\"{{ param }}\" param is required to make URL for \"{{ pattern }}\" route",
|
|
"code": "E_CANNOT_MAKE_ROUTE_URL",
|
|
"status": 500,
|
|
"help": [
|
|
"Make sure to define params object when using `Route.makeUrl` or the view help `route`."
|
|
]
|
|
},
|
|
"E_INVALID_ALS_ACCESS": {
|
|
"message": "HTTP context is not available. Set \"useAsyncLocalStorage\" to true inside \"config/app.ts\" file",
|
|
"code": "E_INVALID_ALS_ACCESS",
|
|
"status": 500,
|
|
"help": [
|
|
"HttpContext.getOrFail method returns the HTTP context only when Async local storage is enabled",
|
|
"- Either, you must enable it insie the config/app.ts file",
|
|
"- Or remove the usage of HttpContext.getOrFail method"
|
|
]
|
|
},
|
|
"E_INVALID_ALS_SCOPE": {
|
|
"message": "Http context is not available outside of an HTTP request",
|
|
"code": "E_INVALID_ALS_SCOPE",
|
|
"status": 500,
|
|
"help": [
|
|
"Make sure the code that attempts to access the HttpContext is running within the scope of an HTTP request"
|
|
]
|
|
}
|
|
}
|