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

feat: return not found error instead internal error for local file not exist #3543

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

RyoJerryYu
Copy link
Contributor

@RyoJerryYu RyoJerryYu commented Jun 9, 2024

Sometimes there may be some resource store on file system disappeared, as the user here described RyoJerryYu/obsidian-memos-sync#14 . (Though I don't know how this happened)

Returning a gRPC NotFound error would be better than returning Internal error. Then we could got a 404 status code when we use gRPC-web or gRPC-gateway API if this was happened.

@RyoJerryYu RyoJerryYu requested a review from boojack as a code owner June 9, 2024 16:59
Copy link
Collaborator

@boojack boojack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, otherwise

server/router/api/v1/resource_service.go Outdated Show resolved Hide resolved
@boojack boojack merged commit 2c819ac into usememos:main Jun 10, 2024
2 checks passed
@RyoJerryYu RyoJerryYu deleted the feat-return-not-exist-local-file branch June 10, 2024 06:14
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.

2 participants