api/processing/request: return a unique error code

This commit is contained in:
wukko 2025-06-20 19:53:01 +06:00
parent ab526c234e
commit d18b22e7ed
No known key found for this signature in database
GPG Key ID: 3E30B3F26C7B4AA2
2 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ export function createResponse(responseType, responseData) {
body: {
status: "error",
error: {
code: code || "error.api.fetch.critical",
code: code || "error.api.fetch.critical.core",
},
critical: true
}
@ -109,7 +109,7 @@ export function createResponse(responseType, responseData) {
}
}
} catch {
return internalError()
return internalError();
}
}

View File

@ -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.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.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!",