CommitteeClash Documentation
API
Backend
Frontend
Actions
App
Components
Lib
Auth
FetchWithValidation
GetSecret
Utils
Functions
CnHandleUnauthorizedAccessThrowResponseError
Types
FrontendLibUtilsFunctions

ThrowResponseError

Function: ThrowResponseError()

function ThrowResponseError(response): Promise<void>

Defined in: src/lib/utils.tsx:24

Throws an error if the response is not ok (status code 200-299).

Parameters

response

Response

The response object to check.

Returns

Promise<void>

Throws

  • Throws an error with the response text if the response is not ok.

HandleUnauthorizedAccess

Previous Page

Types

Next Page

On this page

Function: ThrowResponseError()ParametersresponseReturnsThrows