github-project icon indicating copy to clipboard operation
github-project copied to clipboard

Throw `GitHubProjectItemNotFoundError` when project item could not be found in query

Open gr2m opened this issue 2 years ago • 1 comments

Please avoid duplicates

What’s missing?

A custom error for when an item is not found

Why?

currently a GraphqlResponseError is thrown, with an error looking like this

      {
        type: 'VALIDATION',
        path: [ 'BU' ],
        locations: [ { line: 4, column: 11 } ],
        message: 'The item does not exist in the project'
      }

Alternatives you tried

The error can be caught and identified by manually looking through all errors included in the response

Would you be interested in contributing the feature?

  • [ ] yes

gr2m avatar Oct 07 '23 22:10 gr2m

Another error can look like this

GraphqlResponseError: Request failed due to following response errors:
 - Could not resolve to a node with the global id of 'PVTI_lADNJr_OAAWBdc4Cg8PL'.

gr2m avatar Oct 24 '23 04:10 gr2m