Browse Source

@uppy/url: remove unused error handler (#5200)

Mikael Finstad 10 months ago
parent
commit
26cdd6b370
1 changed files with 1 additions and 9 deletions
  1. 1 9
      packages/@uppy/url/src/Url.tsx

+ 1 - 9
packages/@uppy/url/src/Url.tsx

@@ -121,15 +121,7 @@ export default class Url<M extends Meta, B extends Body> extends UIPlugin<
   }
 
   private getMeta = (url: string): Promise<MetaResponse> => {
-    return this.client.post<MetaResponse>('url/meta', { url }).then((res) => {
-      // TODO: remove this handler in the next major
-      if ((res as any).error) {
-        this.uppy.log('[URL] Error:')
-        this.uppy.log((res as any).error)
-        throw new Error('Failed to fetch the file')
-      }
-      return res
-    })
+    return this.client.post<MetaResponse>('url/meta', { url })
   }
 
   private addFile = async (