()
| 26 | ) |
| 27 | |
| 28 | func ExampleError_Message() { |
| 29 | err := fmt.Errorf( |
| 30 | "another: %w", |
| 31 | connect.NewError(connect.CodeUnavailable, errors.New("failed to foo")), |
| 32 | ) |
| 33 | if connectErr := (&connect.Error{}); errors.As(err, &connectErr) { |
| 34 | fmt.Println("underlying error message:", connectErr.Message()) |
| 35 | } |
| 36 | |
| 37 | // Output: |
| 38 | // underlying error message: failed to foo |
| 39 | } |
| 40 | |
| 41 | func ExampleIsNotModifiedError() { |
| 42 | // Assume that the server from NewNotModifiedError's example is running on |