Error Handling Strategies In Go
Published in
2 min readApr 21, 2022
In Go, when a function call returns an error, it’s the caller’s responsibility to check it and take appropriate action. There may be several strategies to handle it.
In this post, let’s take a look at the following four options:
- Propagate
- Retry
- Log and continue.
- Log and stop the program.