Skip to content

Commit

Permalink
Updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stut committed May 2, 2024
1 parent d2853e2 commit 1869f0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ When using the the wrapping functionality (e.g. `Wrap`, `Augment`, `Propagate`),
of an error is preserved as expected. Importantly, it is also preserved when constructing a new error from
a causal error with `NewInternalWithCause`.

Wrap an error with `Retryable` or `NotRetryable` to set the retryability explicitly. This will
override the retryability derived from the error code.

```go
retryableErr := terrors.Retryable(terrors.Augment(err, "didn't work, let's try again", nil))
if terrors.IsRetryable(retryableErr) {
// retry the operation
}
```

## API

Full API documentation can be found on
Expand Down

0 comments on commit 1869f0e

Please sign in to comment.