-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I am using graphql-client to fetch data from GitHub.
Usually, errors returned from GitHub looks like this:
[{"message":"Could not resolve to an Organization with the login of 'GCI-AOSSIE'.","type":"NOT_FOUND","path":["organization"],"locations":[{"line":2,"column":3}]}]However, sometimes GitHub returns errors as follows:
[{"message":"Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `E689:1AF6:67E816:BAAF4C:5BD321E1` when reporting this issue."}]Note that it doesn't have locations field.
Under the latter circumstance,
Line 2 in f8d1dcb
| var locations = errors.map(function (e) { return e.locations }) |
together with
Line 11 in f8d1dcb
| var lineErrors = locations.filter(function (loc) { return loc && loc.line === line }) |
would cause an error:
cannot read property 'line' of undefined
Metadata
Metadata
Assignees
Labels
No labels