UNPKG

bananas-commerce-admin

Version:

What's this, an admin for apes?

14 lines (13 loc) 442 B
export interface FormErrors { fieldErrors: Record<string, string>; formErrors: string[]; } export declare class ValidationError extends Error { fieldErrors: Record<string, string>; formErrors: string[]; constructor(message: string, errors: FormErrors); } /** * Extract form and field level errors from a 400 response, if present. */ export declare function getFormErrors(response: Response): Promise<FormErrors | null>;