@proofkit/fmodata
Version:
FileMaker OData API client
13 lines (12 loc) • 673 B
TypeScript
import { FMODataErrorType } from '../errors.js';
/**
* Parses an error response and returns an appropriate error object.
* This helper is used by builder processResponse methods to handle error responses
* consistently, particularly important for batch operations where errors need to be
* properly parsed from the response body.
*
* @param response - The Response object (may be from batch or direct request)
* @param url - The URL that was requested (for error context)
* @returns An appropriate error object (ODataError, SchemaLockedError, or HTTPError)
*/
export declare function parseErrorResponse(response: Response, url: string): Promise<FMODataErrorType>;