@uppy/companion
Version:
OAuth helper and remote fetcher for Uppy's (https://uppy.io) extensible file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox and Google Drive, S3 and more :dog:
30 lines (29 loc) • 924 B
TypeScript
/**
*
* @param {{
* fn: () => any,
* tag: string,
* providerName: string,
* isAuthError?: (a: { statusCode: number, body?: object }) => boolean,
* isUserFacingError?: (a: { statusCode: number, body?: object }) => boolean,
* getJsonErrorMessage: (a: object) => string
* }} param0
* @returns
*/
export function withProviderErrorHandling({ fn, tag, providerName, isAuthError, isUserFacingError, getJsonErrorMessage, }: {
fn: () => any;
tag: string;
providerName: string;
isAuthError?: (a: {
statusCode: number;
body?: object;
}) => boolean;
isUserFacingError?: (a: {
statusCode: number;
body?: object;
}) => boolean;
getJsonErrorMessage: (a: object) => string;
}): Promise<any>;
export function withGoogleErrorHandling(providerName: any, tag: any, fn: any): Promise<any>;
export { parseHttpError };
import { parseHttpError } from './error.js';