Skip to content

Request module wrongly manage response status code #23

@benouat

Description

@benouat

The request module embedded in noder is a bit too restrictive with status code detection when the response get back from the server.

// line 35, in `browser_modules/request.js`
var error = (xhr.status != 200);

I think we should definitely change that code as it is not true at all.
We should do it the other way around, and really list only the status that are considered as errors.

I was playing with a PUT call to the server to create an object in DB, that would usually respond with a status code 201 CREATED. It then goes into the error which is totally wrong

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions