File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ class PubNubMiddleware {
125125 activeCancellation = attemptCancellation ;
126126 const responseHandler = ( res , error ) => {
127127 const retriableError = error ? error . category !== categories_1 . default . PNCancelledCategory : true ;
128- const retriableStatusCode = ! res || res . status >= 400 ;
128+ const retriableStatusCode = ( ! res || res . status >= 400 ) && ( error === null || error === void 0 ? void 0 : error . statusCode ) !== 404 ;
129129 let delay = - 1 ;
130130 if ( retriableError &&
131131 retriableStatusCode &&
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ export class PubNubMiddleware implements Transport {
173173
174174 const responseHandler = ( res ?: TransportResponse , error ?: PubNubAPIError ) => {
175175 const retriableError = error ? error . category !== StatusCategory . PNCancelledCategory : true ;
176- const retriableStatusCode = ! res || res . status >= 400 ;
176+ const retriableStatusCode = ( ! res || res . status >= 400 ) && error ?. statusCode !== 404 ;
177177 let delay = - 1 ;
178178
179179 if (
You can’t perform that action at this time.
0 commit comments