We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fedf75e commit aa2d756Copy full SHA for aa2d756
1 file changed
apps/sim/lib/mcp/utils.test.ts
@@ -284,6 +284,13 @@ describe('categorizeError', () => {
284
expect(result.message).toBe('Invalid request parameters')
285
})
286
287
+ it.concurrent('returns 503 for cooldown errors', () => {
288
+ const error = new Error('Server recently failed and is in cooldown — try again shortly.')
289
+ const result = categorizeError(error)
290
+ expect(result.status).toBe(503)
291
+ expect(result.message).toBe('Server temporarily unavailable')
292
+ })
293
+
294
it.concurrent('returns 500 for generic errors', () => {
295
const error = new Error('Something went wrong')
296
const result = categorizeError(error)
0 commit comments