nats-io / jsm.go

JetStream Management Library for Golang
Apache License 2.0
151 stars 26 forks source link

Parse Snapshot message header to check for non-204 status codes #545

Closed christopher-wong closed 2 months ago

christopher-wong commented 2 months ago

When the server cancels backup due to a timeout or lost interest, the jetstream backup client does not return an error. This change parses the error from the nats message header and returns an error to the caller if it's anything but a successful 204.

https://github.com/nats-io/nats-server/blob/main/server/jetstream_api.go#L3823

ripienaar commented 2 months ago

Thank you