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

Separate ErrorResponse from response types #166

Open
rj-calvin opened this issue Oct 31, 2021 · 0 comments
Open

Separate ErrorResponse from response types #166

rj-calvin opened this issue Oct 31, 2021 · 0 comments
Assignees

Comments

@rj-calvin
Copy link
Member

After some development with fetch on the frontend, I've come to the conclusion that it is better for me to assume that the responses are always valid until they are not. In other words, I would prefer if the various response types do not union with ErrorResponse and instead just be defined as the data that is relevant to a successful request. Dealing with the ambiguity of which is which is something that I can handle on the frontend using a bit of logic and type casting.

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