Menu
statechannels docsDocsTypescript APIContract API
🌜
🌞
statechannels docs
  • Docs
  • Typescript API
  • Contract API

@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#

ParameterTypeDescription
jsonBlobobjectA javascript object that might be a valid StateChannelsErrorResponse

Returns:

StateChannelsErrorResponse

The input, but with the correct type, if it is valid.

  • parseErrorResponse() function
  • Parameters
Copyright © 2020