@statechannels/client-api-schema > parseErrorResponse
parseErrorResponse() function
Validates an error response against the API schema & returns the input cast to the correctly narrowed type.
Signature:
export declare function parseErrorResponse(jsonBlob: object): StateChannelsErrorResponse;
Parameters
Parameter | Type | Description |
---|---|---|
jsonBlob | object | A javascript object that might be a valid StateChannelsErrorResponse |
Returns:
The input, but with the correct type, if it is valid.