Skip to content

errors.map is not a function #12

@classical-bit

Description

@classical-bit

var locations = errors.map(function (e) { return e.locations })

I understand by convention errors should be an array. But let's take this example when shopify for invalid access-token returns response as

{
    "errors": "[API] Invalid API key or access token (unrecognized login or wrong password)"
}

can we to a type check and handle this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions