Open hrmoller opened 2 weeks ago
Disabling the authcheck in middleware.ts
does not prevent the error from happening.
I've used chatgpt tool and find out to add below code in below path stack\packages\stack-shared\src\interface\clientInterface.ts
here add below code
// Handle loop detection (508 status code) before processing other responses
if (rawRes.status === 508) {
return Result.error(new KnownErrors.LoopDetected(508, "Infinite loop detected in request chain"));
}
before statement
const processedRes = await this._processResponse(rawRes);
I'm seeing the below error quite a bit in the logs on Vercel but don't see it locally at all.
I have not tracked it down to what part of my own code that provokes this error to happen but will post here when/if I track it down. However, I have the following code in my
middleware.ts
and I suspect that to be the place that triggers the error below.I'm not making any direct calls to
/api/v1/users/me
but I callawait stackServerApp.getUser()
a lot of places in my application.Versions
"@stackframe/stack": "^2.6.12"
"next": "14.2.15"
Error