Hi ! I'm using the React SDK, calling my API throu...
# support-questions-legacy
d
Hi ! I'm using the React SDK, calling my API through
fetch
calls. Whenever a request ends up with status 401, I see it being retried after refreshing the session as a consequence of
addFetchInterceptorsAndReturnModifiedFetch
. Do I have some control over this behavior ? There are some cases where I don't want to attempt refreshing the session after a 401 status.
r
hey @demisel We recommend that you reserve
401
status code for this use case wherein it does a refresh. If you are using
401
for something else as well and want to keep using
401
for that, you can change the status code for session refreshing to something else other than
401
using the
sessionExpiredStatusCode
config on the frontend and backend SDKs (in session.init).
If i have misunderstood your use case, can you elaborate on it please.
d
Alright thanks for the on-point answer !
2 Views