UNPKG

@uppy/provider-views

Version:

View library for Uppy remote provider plugins.

19 lines 547 B
const handleError = uppy => error => { // authError just means we're not authenticated, don't report it if (error.isAuthError) { return; } // AbortError means the user has clicked "cancel" on an operation if (error.name === 'AbortError') { uppy.log('Aborting request', 'warning'); return; } uppy.log(error, 'error'); if (error.name === 'UserFacingApiError') { uppy.info({ message: uppy.i18n('companionError'), details: uppy.i18n(error.message) }, 'warning', 5000); } }; export default handleError;