···11+import {t} from '@lingui/macro'
22+13export function cleanError(str: any): string {
24 if (!str) {
35 return ''
···68 str = str.toString()
79 }
810 if (isNetworkError(str)) {
99- return 'Unable to connect. Please check your internet connection and try again.'
1111+ return t`Unable to connect. Please check your internet connection and try again.`
1012 }
1111- if (str.includes('Upstream Failure')) {
1212- return 'The server appears to be experiencing issues. Please try again in a few moments.'
1313+ if (
1414+ str.includes('Upstream Failure') ||
1515+ str.includes('NotEnoughResources') ||
1616+ str.includes('pipethrough network error')
1717+ ) {
1818+ return t`The server appears to be experiencing issues. Please try again in a few moments.`
1319 }
1420 if (str.includes('Bad token scope')) {
1515- return 'This feature is not available while using an App Password. Please sign in with your main password.'
2121+ return t`This feature is not available while using an App Password. Please sign in with your main password.`
1622 }
1723 if (str.startsWith('Error: ')) {
1824 return str.slice('Error: '.length)