MCPcopy
hub / github.com/vercel/chatbot / getStatusCodeByType

Function getStatusCodeByType

lib/errors.ts:115–132  ·  view source on GitHub ↗
(type: ErrorType)

Source from the content-addressed store, hash-verified

113}
114
115function getStatusCodeByType(type: ErrorType) {
116 switch (type) {
117 case 'bad_request':
118 return 400;
119 case 'unauthorized':
120 return 401;
121 case 'forbidden':
122 return 403;
123 case 'not_found':
124 return 404;
125 case 'rate_limit':
126 return 429;
127 case 'offline':
128 return 503;
129 default:
130 return 500;
131 }
132}

Callers 1

constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…