Skip to content

Conversation

@rohilsurana
Copy link
Member

Fixes #8

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")
Copy link
Member

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 ?

Copy link
Member Author

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.

Copy link
Member

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.

@rohilsurana rohilsurana requested a review from krtkvrm March 21, 2022 11:05
@AkarshSatija AkarshSatija merged commit eb6c471 into raystack:main Mar 22, 2022
Meghajit pushed a commit to Meghajit/entropy that referenced this pull request May 4, 2023
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.

[Core][Actions] Add actions endpoint

4 participants