File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ async function getResponseJson(
218
218
try {
219
219
return JSON . parse ( data )
220
220
} catch {
221
- throw new Error ( `Invalid JSON response: ${ data } ` )
221
+ throw new Error ( `Socket API returned an invalid JSON response: ${ data } ` )
222
222
}
223
223
}
224
224
@@ -336,13 +336,13 @@ export class SocketSdk {
336
336
error : unknown
337
337
) : SocketSdkErrorType < T > {
338
338
if ( ! ( error instanceof ResponseError ) ) {
339
- throw new Error ( 'Unexpected error when calling API' , {
339
+ throw new Error ( 'Unexpected Socket API error ' , {
340
340
cause : error
341
341
} )
342
342
}
343
343
const statusCode = error . response . statusCode
344
344
if ( statusCode ! >= 500 ) {
345
- throw new Error ( 'API returned an error' , { cause : error } )
345
+ throw new Error ( 'Socket API returned an error' , { cause : error } )
346
346
}
347
347
return {
348
348
success : false as const ,
You can’t perform that action at this time.
0 commit comments