How to handle failed transactions

Hey everyone, this is not directly related to Kysely but I was wondering what is a common solution for handling failed transactions? - is it supposed to be logged somewhere so you can review it?
1 Reply
Igal
Igal16mo ago
Hey 👋🏻 Generally in production-grade applications you'd have things monitored (+ alerts), you might have queues in between with retry mechanism + dead letter queue. dead letter queues could be consumed too for error handling - or could simply be used to investigate and re-drive later. The system could be event-sourced, so you always have the event persisted and could replay it from the event stream. returning an immediate error response without all of the stuff above ^, is also fine... it really depends on your product requirements.
Want results from more Discord servers?
Add your server