Skip to content
New issue

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

fix: return error if project not found #3545

Closed
wants to merge 1 commit into from
Closed

Conversation

shreddedbacon
Copy link
Member

@shreddedbacon shreddedbacon commented Sep 12, 2023

Checklist

  • Affected Issues have been mentioned in the Closing issues section
  • Documentation has been written/updated
  • PR title is ready for inclusion in changelog

If you query the API for a project by name and the project does not exist, you get a strange error that makes it difficult to know what went wrong. This fixes it to return a project not found error instead

Previous error, what does it mean?

{
  "errors": [
    {
      "message": "Cannot read properties of undefined (reading 'id')",
      "locations": [
        {
          "line": 100,
          "column": 3
        }
      ],
      "path": [
        "projectByName"
      ]
    }
  ],
  "data": {
    "projectByName": null
  }
}

closes #3547

@shreddedbacon
Copy link
Member Author

Closing this as the error is actually coming from something unrelated from a current hotfix applied to amazeeio infrastructure.

@shreddedbacon shreddedbacon deleted the project-not-found branch December 11, 2023 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better error message when trying to get a project that does not exist
1 participant