File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,13 +89,7 @@ export namespace SessionRetry {
8989 if ( json . type === "error" && json . error ?. code ?. includes ( "rate_limit" ) ) {
9090 return "Rate Limited"
9191 }
92- if (
93- json . error ?. message ?. includes ( "no_kv_space" ) ||
94- ( json . type === "error" && json . error ?. type === "server_error" ) ||
95- ! ! json . error
96- ) {
97- return "Provider Server Error"
98- }
92+ return JSON . stringify ( json )
9993 } catch {
10094 return undefined
10195 }
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ describe("session.retry.retryable", () => {
9999
100100 test ( "handles json messages without code" , ( ) => {
101101 const error = wrap ( JSON . stringify ( { error : { message : "no_kv_space" } } ) )
102- expect ( SessionRetry . retryable ( error ) ) . toBe ( "Provider Server Error" )
102+ expect ( SessionRetry . retryable ( error ) ) . toBe ( `{"error":{"message":"no_kv_space"}}` )
103103 } )
104104
105105 test ( "does not throw on numeric error codes" , ( ) => {
You can’t perform that action at this time.
0 commit comments