Prechádzať zdrojové kódy

Merge pull request #1478 from transloadit/fix/remove-auth-error-info

Don’t show informer for an auth error
Artur Paikin 6 rokov pred
rodič
commit
42b3e1f718

+ 4 - 1
packages/@uppy/provider-views/src/index.js

@@ -445,7 +445,10 @@ module.exports = class ProviderView {
   handleError (error) {
     const uppy = this.plugin.uppy
     uppy.log(error.toString())
-    const message = uppy.i18n(error.isAuthError ? 'companionAuthError' : 'companionError')
+    if (error.isAuthError) {
+      return
+    }
+    const message = uppy.i18n('companionError')
     uppy.info({message: message, details: error.toString()}, 'error', 5000)
   }