Skip to content

Commit 01b33a7

Browse files
authored
fix(errors): adjust message of QuotasExceededError (#404)
1 parent 723e322 commit 01b33a7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/clients/src/scw/errors/non-standard/__tests__/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ describe('InvalidRequestError', () => {
5050
},
5151
])
5252
expect(error.message).toBe(
53-
'quota exceeded(s): compute_snapshots_type_b_ssd_available has reached its quota (0/0)',
53+
'quota(s) exceeded: compute_snapshots_type_b_ssd_available has reached its quota (0/0)',
5454
)
5555
})
5656

packages/clients/src/scw/errors/standard/__tests__/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('QuotasExceededError', () => {
9494

9595
it(`parses a valid input`, () => {
9696
expect(parseScalewayError(403, body).toString()).toBe(
97-
`QuotasExceededError: quota exceeded(s): instance_volume has reached its quota (10/10) for project 'b7a1cf21-1e90-464c-a9f6-375c4d1f4b64'; instance_volumes_l_ssd_total_gb has reached its quota (80/100) for organization '72dd6741-d748-42e7-ba65-acd07447d3e9'; instance_volumes_l_ssd_total_gb has reached its quota (70/100)`,
97+
`QuotasExceededError: quota(s) exceeded: instance_volume has reached its quota (10/10) for project 'b7a1cf21-1e90-464c-a9f6-375c4d1f4b64'; instance_volumes_l_ssd_total_gb has reached its quota (80/100) for organization '72dd6741-d748-42e7-ba65-acd07447d3e9'; instance_volumes_l_ssd_total_gb has reached its quota (70/100)`,
9898
)
9999
})
100100

packages/clients/src/scw/errors/standard/quotas-exceeded-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type QuotasExceededErrorDetails = {
3333
* @internal
3434
*/
3535
const buildMessage = (list: QuotasExceededErrorDetails[]): string =>
36-
`quota exceeded(s): ${list
36+
`quota(s) exceeded: ${list
3737
.map(details => {
3838
const message = `${details.resource} has reached its quota (${details.current}/${details.quota})`
3939

0 commit comments

Comments
 (0)