Errors in Smithy/Smithy4s and how to deal with them
Вставка
- Опубліковано 1 жов 2024
- In this one, we're talking about adding error responses to your Smithy specs and how that's handled in HTTP.
Then, in the later part of the video, we go over how to raise and recover from errors in Smithy4s specifically.
Prerequisites:
Smithy side: episodes 1, 2, 5, 6
Smithy4s side: all past episodes.
If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;)
Project repository: github.com/kub...
I'm on Twitter: / kubukoz
on GitHub: github.com/kub...
sometimes stream on Twitch: / kubukoz
And you can buy me a coffee if you want: ko-fi.com/kubukoz
Chapters:
00:00:34 - Errors in smithy
00:03:34 - Tangent about exposing error reasons in APIs
00:04:27 - Service errors
00:05:34 - Error responses in real HTTP
00:08:02 - Raising errors in Smithy4s
00:10:10 - How do I know what errors can be raised?
00:10:57 - Handling errors on the client
00:12:52 - Transforming unexpected errors
00:16:51 - Typed errors (server-side)
00:19:52 - Scala 3 Error unions
00:20:31 - Typed errors (client-side)