mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
api/processing/request: return a unique error code
This commit is contained in:
parent
ab526c234e
commit
d18b22e7ed
@ -11,7 +11,7 @@ export function createResponse(responseType, responseData) {
|
|||||||
body: {
|
body: {
|
||||||
status: "error",
|
status: "error",
|
||||||
error: {
|
error: {
|
||||||
code: code || "error.api.fetch.critical",
|
code: code || "error.api.fetch.critical.core",
|
||||||
},
|
},
|
||||||
critical: true
|
critical: true
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ export function createResponse(responseType, responseData) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
return internalError()
|
return internalError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
"fetch.fail": "something went wrong when fetching info from {{ service }} and i couldn't get anything for you. if this issue sticks, please report it!",
|
"fetch.fail": "something went wrong when fetching info from {{ service }} and i couldn't get anything for you. if this issue sticks, please report it!",
|
||||||
"fetch.critical": "the {{ service }} module returned an error that i don't recognize. try again in a few seconds, but if this issue sticks, please report it!",
|
"fetch.critical": "the {{ service }} module returned an error that i don't recognize. try again in a few seconds, but if this issue sticks, please report it!",
|
||||||
|
"fetch.critical.core": "one of core modules returned an error that i don't recognize. try again in a few seconds, but if this issue sticks, please report it!",
|
||||||
"fetch.empty": "couldn't find any media that i could download for you. are you sure you pasted the right link?",
|
"fetch.empty": "couldn't find any media that i could download for you. are you sure you pasted the right link?",
|
||||||
"fetch.rate": "the processing instance got rate limited by {{ service }}. try again in a few seconds!",
|
"fetch.rate": "the processing instance got rate limited by {{ service }}. try again in a few seconds!",
|
||||||
"fetch.short_link": "couldn't get info from the short link. are you sure it works? if it does and you still get this error, please report the issue!",
|
"fetch.short_link": "couldn't get info from the short link. are you sure it works? if it does and you still get this error, please report the issue!",
|
||||||
|
Loading…
Reference in New Issue
Block a user