[PR #666] [MERGED] Map errors to HTTP statuses #810

Closed
opened 2026-03-03 12:31:43 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fsouza/fake-gcs-server/pull/666
Author: @gaul
Created: 1/31/2022
Status: Merged
Merged: 2/3/2022
Merged by: @fsouza

Base: mainHead: map-error-to-http-status


📝 Commits (1)

  • 947601e Map errors to HTTP statuses

📊 Changes

3 files changed (+25 additions, -6 deletions)

View changed files

📝 fakestorage/json_response.go (+12 -0)
📝 fakestorage/object.go (+9 -2)
📝 fakestorage/upload.go (+4 -4)

📄 Description

The initial motivation is to map ENAMETOOLONG from 500 Internal Error
to 400 Bad Request. This prevents clients like gcsfuse from
unnecessarily retrying requests. This commit also remove some panic
call paths.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fsouza/fake-gcs-server/pull/666 **Author:** [@gaul](https://github.com/gaul) **Created:** 1/31/2022 **Status:** ✅ Merged **Merged:** 2/3/2022 **Merged by:** [@fsouza](https://github.com/fsouza) **Base:** `main` ← **Head:** `map-error-to-http-status` --- ### 📝 Commits (1) - [`947601e`](https://github.com/fsouza/fake-gcs-server/commit/947601e790e75d11495c712c166a7174a7bb2cf7) Map errors to HTTP statuses ### 📊 Changes **3 files changed** (+25 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `fakestorage/json_response.go` (+12 -0) 📝 `fakestorage/object.go` (+9 -2) 📝 `fakestorage/upload.go` (+4 -4) </details> ### 📄 Description The initial motivation is to map `ENAMETOOLONG` from 500 Internal Error to 400 Bad Request. This prevents clients like gcsfuse from unnecessarily retrying requests. This commit also remove some panic call paths. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 12:31:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/fake-gcs-server#810
No description provided.