mirror of
https://github.com/imputnet/cobalt.git
synced 2026-11-01 07:14:36 +00:00
api: update error codes in services, add more error codes where needed
This commit is contained in:
parent
c698d272a1
commit
05abf9ad3e
21 changed files with 263 additions and 141 deletions
|
|
@ -241,14 +241,14 @@ export default async function(host, patternMatch, obj) {
|
|||
|
||||
if (r.error && r.critical) {
|
||||
return createResponse("critical", {
|
||||
code: r.error
|
||||
code: `error.api.${r.error}`,
|
||||
})
|
||||
}
|
||||
|
||||
if (r.error) {
|
||||
return createResponse("error", {
|
||||
code: r.error,
|
||||
context: response?.context
|
||||
code: `error.api.${r.error}`,
|
||||
context: r?.context
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue