Skip to content

Consider checking if there's a statusText property. #24

@weerd

Description

@weerd

If we're using gateway to potentially ping a server and and see if it's running (example scenario is with Sixpack and confirming it's up and running before executing all the logic for a Sixpack experiment), we may end up with responses that aren't JSON and do not contain a statusText in the response.

https://github.com/DoSomething/gateway-js/blob/master/src/RestApiClient.js#L42

It could be useful to check before passing it to the GatewayError() class, or maybe throwing a simpler error if response isn't JSON. 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions