Azure / go-amqp

AMQP 1.0 client library for Go.
https://github.com/Azure/go-amqp
MIT License
108 stars 59 forks source link

Allow for errors.As() to see the underlying AMQP error #329

Closed richardpark-msft closed 2 months ago

richardpark-msft commented 2 months ago

In the majority of common use cases, the LinkError, ConnError and SessionError will contain an amqp.Error. It's simpler, for callers, if they can simply check errors.As(&amqp.Error) so they can write general error handling, rather than having to check the envelope type each time.