Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review status codes returned when wrapped service returns non-200 #52

Open
jar398 opened this issue Oct 12, 2017 · 3 comments
Open

Review status codes returned when wrapped service returns non-200 #52

jar398 opened this issue Oct 12, 2017 · 3 comments

Comments

@jar398
Copy link

jar398 commented Oct 12, 2017

This is just a request for design review regarding HTTP status codes returned by the services when the wrapped service yields a code other than 200, as discussed on today's call.

Currently if a wrapped service (e.g. tnrs/ot/resolve) returns a 400 or other non-200 HTTP status code, the phylotastic service returns a 200, with a payload that contains a status_code field giving the wrapped service's status code.

An alternative design, which might be seen as simpler for clients (one check instead of two) and better in line with the HTTP spec, would be to have the phylotastic service return the same status code (with some exceptions) as the wrapped service. The payload could be the same as at present.

There could be exceptions in cases where phylotastic 'knows better' than the wrapped service, e.g. because it has successfully compensated for a bug in the wrapped service.

@abusalehmdtayeen
Copy link
Collaborator

@jar398 , I have started to work on this issue for all phylotastic web services. I will also include additional parameters for some web services to improve the functionality. Based on that, the structure of results for those services may change. Please give me couple of days to finish this. I will update the current documentation with more info (new params, example results, error codes, capacity) and let you know. Thanks.

@jar398
Copy link
Author

jar398 commented Oct 18, 2017 via email

@abusalehmdtayeen
Copy link
Collaborator

@jar398 , I have created an updated documentation of the services for the modifications I made related to this issue. You can find the documentation in the README file of the following link.
https://github.com/phylotastic/phylo_services_docs/tree/master/ServiceDescription

Please note that I have not pushed the changes to the server yet. So trying the examples in this doc will not work at this moment. Please have a look at the doc and give me your suggestions (if anything needs to be changed or added) before I push the modified codes. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants