Skip to content

Commit 774e7f5

Browse files
authored
chore(errors): remove toLower conversion for API error messages (scaleway#2310)
1 parent 210045c commit 774e7f5

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

scw/errors.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ func (e *ResponseError) UnmarshalJSON(b []byte) error {
5050
if err != nil {
5151
return err
5252
}
53-
54-
tmp.Message = strings.ToLower(tmp.Message)
55-
5653
*e = ResponseError(tmp)
5754
return nil
5855
}

scw/errors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func TestNonStandardError(t *testing.T) {
149149
expectedError: &ResponseError{
150150
Status: "409 Conflict",
151151
StatusCode: http.StatusConflict,
152-
Message: "group is in use. you cannot delete it.",
152+
Message: "Group is in use. You cannot delete it.",
153153
Type: "conflict",
154154
RawBody: []byte(`{"message": "Group is in use. You cannot delete it.", "type": "conflict"}`),
155155
},

0 commit comments

Comments
 (0)