You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to list notifications for a project, if the project doesn't exist (eg, accidental typo of a project name), the returned data does not contain an error, just a null payload.
Unfortunately the projectByName resolver doesn't seem to return an error if a project doesn't exist :hide-the-pain:
A quick one would be to check that results.Notifications is not nil, and potentially update the query in machinery to also request the name and id fields to check if a project is returned.
This occurs on all list project notifications, not just slack.
The text was updated successfully, but these errors were encountered:
…ifications found (#322) (#323)
* Included logic checks if project doesn't exist or no notifications found
* Upgraded to latest machinery
---------
Co-authored-by: Ben Jackson <shreddedbacon@users.noreply.github.com>
When attempting to list notifications for a project, if the project doesn't exist (eg, accidental typo of a project name), the returned data does not contain an error, just a
null
payload.When this is called https://github.com/uselagoon/lagoon-cli/blob/main/cmd/notificationsslack.go#L175, the data for result is empty, and
result.Notifications
isnil
which when it tries to iterate over, results in a panic.Unfortunately the
projectByName
resolver doesn't seem to return an error if a project doesn't exist :hide-the-pain:A quick one would be to check that
results.Notifications
is not nil, and potentially update the query in machinery to also request thename
andid
fields to check if a project is returned.This occurs on all list project notifications, not just slack.
The text was updated successfully, but these errors were encountered: