Temporary vs Permanent Errors

Temporary vs Permanent Errors 图片 1

When working on external integrations, we often implement basic error handling. Most of the time, we just use resp.raise_for_status() and leave it for our future self to handle.

Quite often, we don’t handle errors because we genuinely don’t know how the external system will behave and what types of errors to expect from it. Indeed, it can be overwhelming to consider all the possible corner cases and provide appropriate reactions to them. What should I do if the server returns a 503 error? What if I am rate-limited? What if there’s a connection timeout, and so on? It involves a long list of exceptional cases and handlers that need to be implemented, documented, and tested.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论