UNPKG

pinata-expo-hooks

Version:

React Native/Expo hooks for Pinata TUS uploads

33 lines (32 loc) 792 B
export class PinataError extends Error { constructor(message) { super(message); this.name = "PinataError"; } } export class NetworkError extends PinataError { status; details; constructor(message, status, details) { super(message); this.name = "NetworkError"; this.status = status; this.details = details; } } export class AuthenticationError extends PinataError { status; details; constructor(message, status, details) { super(message); this.name = "AuthenticationError"; this.status = status; this.details = details; } } export class ValidationError extends PinataError { constructor(message) { super(message); this.name = "ValidationError"; } }