UNPKG

@ts-rest/react-query

Version:

react-query client integration for @ts-rest

12 lines (9 loc) 402 B
import { isUnknownErrorResponse } from '@ts-rest/core'; export { exhaustiveGuard, isUnknownErrorResponse } from '@ts-rest/core'; const isFetchError = (error) => { return error instanceof Error; }; const isNotKnownResponseError = (error, contractEndpoint) => { return isFetchError(error) || isUnknownErrorResponse(error, contractEndpoint); }; export { isFetchError, isNotKnownResponseError };