Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

Correctly handling status codes with fetch #5

Merged
merged 1 commit into from
Feb 8, 2016

Conversation

corymsmith
Copy link
Contributor

Fixes #4 to properly throw errors

@daffl
Copy link
Member

daffl commented Jan 20, 2016

Is the test at https://github.com/feathersjs/feathers-commons/blob/master/src/test/client.js#L76 missing something? I'm wondering why that passed before.

@corymsmith
Copy link
Contributor Author

Yes it must be, I looked at the tests a bit and tried to set up some failing tests around it so I could make them pass with this fix and couldn't quite sort it so just tested manually :)

@daffl
Copy link
Member

daffl commented Jan 20, 2016

Do you have a breaking service/request combination?

@corymsmith
Copy link
Contributor Author

I was doing a find that was throwing a 500 or 401 error

@ekryski
Copy link
Member

ekryski commented Jan 21, 2016

Ya I was literally going to ask the same. The way the common tests are written in feathers-commons it's not easy to throw a 404 to test it. Gonna tinker with it a bit. It is kind of an important one to have a test around.

@daffl
Copy link
Member

daffl commented Jan 21, 2016

But it is throwing an error at https://github.com/feathersjs/feathers-rest/blob/master/test/client/server.js#L23 and verifying that the client resolves with that error at https://github.com/feathersjs/feathers-commons/blob/master/src/test/client.js#L76. That should at least send a 500 status code.

ekryski added a commit that referenced this pull request Feb 8, 2016
Correctly handling status codes with fetch
@ekryski ekryski merged commit fa47bd2 into feathersjs-ecosystem:master Feb 8, 2016
@ekryski
Copy link
Member

ekryski commented Feb 8, 2016

I added a test for this and pushed it to master.

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

Successfully merging this pull request may close these issues.

3 participants