Hi, I’m overriding consumeCodePOST because I need ...
# support-questions-legacy
a
Hi, I’m overriding consumeCodePOST because I need to insert the user in an external database. Using Next. I catch the error in case the insert in the external database fails and in that case I return a 500 response. The problem is, since the original supertokens request succeeded, cookies are being set in the res, therefore the session is created on the client regardless of the 500 status. I’m doing something like that as a workaround. Does it make any sense?