oliyh / martian

The HTTP abstraction library for Clojure/script, supporting OpenAPI, Swagger, Schema, re-frame and more
MIT License
525 stars 42 forks source link

Ensure graceful failure for implementation-specific objects that vcr writes but can't read back #205

Closed lvh closed 3 weeks ago

lvh commented 3 weeks ago

Fixes #203

lvh commented 3 weeks ago

Happy to try and write a test for this if you have some guidance on how to do it. Also would prefer to get #204 merged first since the tests will almost certainly conflict.

Proposal: just have the underlying dummy responder in the test return a function ((constantly 'xyzzy)) works).

oliyh commented 3 weeks ago

Hi thank you for this, it's a nice general solution.

Looks like no tests have changed - either here on in the other PR - we can merge this one now?

Cheers

lvh commented 3 weeks ago

I don't think there's a reason not to, no: only reason would be if you thought there was good reason the behavior was brittle and as such it's important to write a specific test.

oliyh commented 3 weeks ago

Thank you for this!