-
Notifications
You must be signed in to change notification settings - Fork 8
feat(actions): add actions endpoint #26
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
Conversation
api/handlers/v1/resource.go
Outdated
| if errors.Is(err, store.ResourceNotFoundError) { | ||
| return nil, status.Error(codes.NotFound, "could not find resource with given urn") | ||
| } | ||
| return nil, status.Error(codes.Internal, "failed to apply fetch resource from db") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before returning back resp to the client, how about logging the error as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take this up as a separate issue, initially was thinking of keeping the logging limited to the middleware. Will check if there is a way to log these details but skip sending to client at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes ideally, every internal server error should be logged out.
Fixes #8