Skip to content

Commit 7d4ce2e

Browse files
kaloyan-raevStorj Robot
authored and
Storj Robot
committed
miniogw: remove XStorj prefix from error codes
Error codes might be displayed by S3 apps and the word "Storj" in them might be problematic for whitelabeling partners. Change-Id: Ia1740db1084a07ab445b7fef2f011d4b41d6b4aa
1 parent 8e8db65 commit 7d4ce2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

miniogw/gateway.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var (
4141
// In this case though the user can solve it themselves by getting a
4242
// limit increase, so it should be treated as a 4xx level error, not 5xx.
4343
ErrBandwidthLimitExceeded = miniogo.ErrorResponse{
44-
Code: "XStorjBandwidthLimitExceeded",
44+
Code: "BandwidthLimitExceeded",
4545
StatusCode: http.StatusForbidden,
4646
Message: "You have reached your Storj project bandwidth limit on the Satellite.",
4747
}
@@ -55,23 +55,23 @@ var (
5555
// case though the user can solve this themselves by upgrading their plan,
5656
// so it should be treated as a 4xx level error, not 5xx.
5757
ErrStorageLimitExceeded = miniogo.ErrorResponse{
58-
Code: "XStorjStorageLimitExceeded",
58+
Code: "StorageLimitExceeded",
5959
StatusCode: http.StatusForbidden,
6060
Message: "You have reached your Storj project storage limit on the Satellite.",
6161
}
6262

6363
// ErrSegmentsLimitExceeded is a custom error for when a user has reached their
6464
// Satellite segment limit.
6565
ErrSegmentsLimitExceeded = miniogo.ErrorResponse{
66-
Code: "XStorjSegmentsLimitExceeded",
66+
Code: "SegmentsLimitExceeded",
6767
StatusCode: http.StatusForbidden,
6868
Message: "You have reached your Storj project segment limit on the Satellite.",
6969
}
7070

7171
// ErrInvalidTTL indicates that the value under
7272
// X-Amz-Meta-Object-Expires/X-Minio-Meta-Object-Expires couldn't be parsed.
7373
ErrInvalidTTL = miniogo.ErrorResponse{
74-
Code: "XStorjInvalidTTL",
74+
Code: "InvalidTTL",
7575
Message: "The TTL you have specified is invalid.",
7676
StatusCode: http.StatusBadRequest,
7777
}

0 commit comments

Comments
 (0)