spandex-project / spandex_datadog

A datadog adapter for the `spandex` library.
MIT License
59 stars 42 forks source link

Handle structs explicitly when adding error type #37

Closed cararemixed closed 3 years ago

cararemixed commented 3 years ago

We want to avoid assuming that all errors reasons are either nil or structs. This rearranges the clauses and uses pattern matching to handle the struct case, allowing us to handle anything else like we handled the nil case before.

vovayartsev commented 3 years ago

Running github: "cararemixed/spandex_datadog", branch: "fix-non-struct-error-metadata" in production for 1 month - so far so good.

Would really love to see the PR merged 👍

GregMefford commented 3 years ago

Excellent, thanks so much for taking the time to submit a PR for this, @cararemixed and also @vovayartsev for confirming that it's working well! 🚀