We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A custom error (see the existing ones) that is thrown in case a project cannot be found based on the provided owner and number.
owner
number
The current behavior is to throw a GraphqlResponseError like this
GraphqlResponseError
GraphqlResponseError { data: { userOrOrganization: { projectV2: null, }, }, errors: [ { locations: [ { column: 9, line: 5, }, ], message: 'Could not resolve to a ProjectV2 with the number 99999.', path: [ 'userOrOrganization', 'projectV2', ], type: 'NOT_FOUND', }, ], headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', connection: 'close', 'content-encoding': 'gzip', 'content-security-policy': 'default-src \'none\'', 'content-type': 'application/json; charset=utf-8', date: 'Sat, 20 May 2023 00:15:13 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'GitHub.com', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-content-type-options': 'nosniff', 'x-frame-options': 'deny', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': 'E53B:4AD2:8F6A462:944B6F1:64681111', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '4989', 'x-ratelimit-reset': '1684545298', 'x-ratelimit-resource': 'graphql', 'x-ratelimit-used': '11', 'x-xss-protection': '0', }, request: { query: `␊ query getProjectCoreData($owner: String!, $number: Int!) {␊ userOrOrganization: repositoryOwner(login: $owner) {␊ ... on ProjectV2Owner {␊ projectV2(number: $number) {␊ ␊ id␊ title␊ url␊ databaseId␊ fields(first: 50) {␊ nodes {␊ ... on ProjectV2FieldCommon {␊ id␊ dataType␊ name␊ }␊ ... on ProjectV2SingleSelectField {␊ options {␊ id␊ name␊ }␊ }␊ ... on ProjectV2IterationField {␊ configuration {␊ iterations {␊ title␊ duration␊ startDate␊ }␊ completedIterations {␊ title␊ duration␊ startDate␊ }␊ duration␊ startDay␊ }␊ }␊ }␊ }␊ ␊ }␊ }␊ }␊ }␊ `, variables: { number: 99999, owner: 'github-project-fixtures', }, }, response: { data: { userOrOrganization: { projectV2: null, }, }, errors: [ { locations: [ { column: 9, line: 5, }, ], message: 'Could not resolve to a ProjectV2 with the number 99999.', path: [ 'userOrOrganization', 'projectV2', ], type: 'NOT_FOUND', }, ], }, message: `Request failed due to following response errors:␊ - Could not resolve to a ProjectV2 with the number 99999.`, }
It's easy enough to look for the NOT_FOUND type in the GraphqlResponseError, but it's not very elegant.
NOT_FOUND
The text was updated successfully, but these errors were encountered:
GitHubProjectNotFoundError
feat: GitHubProjectNotFoundError (#138)
b48e962
closes #137
🎉 This issue has been resolved in version 5.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
gr2m
Successfully merging a pull request may close this issue.
Please avoid duplicates
What’s missing?
A custom error (see the existing ones) that is thrown in case a project cannot be found based on the provided
owner
andnumber
.Why?
The current behavior is to throw a
GraphqlResponseError
like thisAlternatives you tried
It's easy enough to look for the
NOT_FOUND
type in theGraphqlResponseError
, but it's not very elegant.Would you be interested in contributing the feature?
The text was updated successfully, but these errors were encountered: