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

fix(gitrest): Handle FileSystem Errors in HTTP Responses #22986

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

znewton
Copy link
Contributor

@znewton znewton commented Nov 5, 2024

Description

Currently, there are some filesystem operations in Gitrest that result in a generic 400 HTTP error code, rather than a helpful HTTP status and message based on the error that occurred.

This PR adds some wrapper functions that help determine if an error is a FileSystemError (or RedisFSError, which is similar) and bubble that up as a NetworkError that can be parsed for the HTTP response.

@github-actions github-actions bot added area: server Server related issues (routerlicious) base: main PRs targeted against main branch labels Nov 5, 2024
@znewton znewton merged commit 7abf5cf into microsoft:main Nov 5, 2024
28 checks passed
@znewton znewton deleted the gitrest/400-413 branch November 5, 2024 21:04
Josmithr pushed a commit that referenced this pull request Nov 5, 2024
## Description

Currently, there are some filesystem operations in Gitrest that result
in a generic 400 HTTP error code, rather than a helpful HTTP status and
message based on the error that occurred.

This PR adds some wrapper functions that help determine if an error is a
FileSystemError (or RedisFSError, which is similar) and bubble that up
as a NetworkError that can be parsed for the HTTP response.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: server Server related issues (routerlicious) base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants