api & web: add service context to api.fetch.critical error

This commit is contained in:
wukko 2024-08-24 17:24:51 +06:00
parent 0b7af10ab0
commit 7478a373fc
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 3 additions and 2 deletions

View file

@ -256,8 +256,9 @@ export default async function(host, patternMatch, obj) {
case "fetch.fail":
case "fetch.rate":
case "content.video.unavailable":
case "link.unsupported":
case "api.fetch.critical":
case "content.video.unavailable":
context = {
service: host,
}

View file

@ -25,7 +25,7 @@
"api.link.unsupported": "{{ service }} is supported, but i couldn't recognize your link. have you pasted the right one?",
"api.fetch.fail": "something went wrong when fetching info from {{ service }} and i couldn't find anything for you. are you sure your link works? if it does and you still see this error, let us know, and we'll try to help!",
"api.fetch.critical": "the service module returned an error that i don't recognize. try again in a few seconds, but if issue sticks, let us know!",
"api.fetch.critical": "the {{ service }} module returned an error that i don't recognize. try again in a few seconds, but if issue sticks, let us know!",
"api.fetch.empty": "couldn't find any media that i could download for you. are you sure you pasted the right link?",
"api.fetch.rate": "the cobalt processing server got rate limited by the {{ service }} api. try again in a few seconds!",
"api.fetch.short_link": "couldn't get link info from the short link. are you sure it works? if it does and you still get this error, let us know, and we'll try to help!",