Skip to content

best way to save what you love

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

wukko7478a373fcde
diff --git a/api/src/processing/match.js b/api/src/processing/match.js
index d5fc5e34..4a5880f6 100644
--- a/api/src/processing/match.js
+++ b/api/src/processing/match.js
@@ -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,
}
diff --git a/web/i18n/en/error.json b/web/i18n/en/error.json
index 355f32ee..e9bb0332 100644
--- a/web/i18n/en/error.json
+++ b/web/i18n/en/error.json
@@ -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!",