nebulab / cangaroo

Connect Any App to Any Service
https://github.com/nebulab/cangaroo
MIT License
107 stars 18 forks source link

Response formatting improvement #34

Closed iloveitaly closed 8 years ago

AlessioRocco commented 8 years ago

@iloveitaly I'm not sure we should handle the 201 and 202, Cangaroo comes from Wombat and it doesn't handle these status codes (if I remember well), we must be sure that adding these status codes allows the integrations to work like before and doesn't introduce some strange behaviors or errors.

iloveitaly commented 8 years ago

@AlessioRocco I don't think this change is backwards incompatible with Wombat. Wombat endpoints either return 200 or framework-generated 4xx and 5xx error codes. 2xx indicates a successful response from an endpoint, so I think it makes sense for cangaroo to gracefully handle any error codes in the 2xx range.

Is there a specific use-case you are worried about breaking?

Thanks for thinking through this change!

AlessioRocco commented 8 years ago

@iloveitaly merged, after some thinking I've no found incompatibilities with Wombat. Thanks 👍

iloveitaly commented 8 years ago

@AlessioRocco Awesome, thanks Alessio!