Better error message when trying to get a project that does not exist
seanhamlin opened this issue · 0 comments
seanhamlin commented
e.g.
query GetProjectShort {
projectByName(
name: "does-not-exist"
) {
id
}
}
the result is
{
"errors": [
{
"message": "Cannot read properties of undefined (reading 'id')",
"locations": [
{
"line": 6,
"column": 3
}
],
"path": [
"projectByName"
]
}
],
"data": {
"projectByName": null
}
}
This is not a very helpful error message, and it wastes precious time from a DX perspective, as you think your GraphQL query might be wrong.
Ideal solution
Error message is something like
"The Project
does-not-exist
does not exist in this Lagoon"