Skip to main content

APIParsingContext

Provides contextual information when parsing and decoding Request responses, or errors.

Index

Methods

optionalerror

  • error(from: string): Error
  • Generates an error response from an Request result when an HTTP error occurs.


    Parameters

    • from: string

      Raw data returned from the HTTP response.

    Returns Error

    Optional error option described within the supplied data.

resultType

  • Enables the response from an Request to be customized.

    The default implementation utilizes the response's status code to report the appropriate result.


    Parameters

    Returns APIResponseResult

    The result that should be inferred from this response.

Page Options