fix: improve error handling

- Do not throw in onError callback for server client. This lets the originating error bubble to Next.js.
- Do not log errors inside the service token procedure, server client onError callback will log all procedure errors.
- Log errors for fetching service token failure.
This commit is contained in:
Michael Zetterberg
2024-10-11 10:42:40 +02:00
committed by Pontus Dreij
parent f63cecc488
commit 194ca601b5
3 changed files with 65 additions and 49 deletions

View File

@@ -50,8 +50,6 @@ export function serverClient() {
redirect(redirectUrl)
}
}
throw internalServerError()
},
})
}