mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Standardise API error response format
This commit is contained in:
@@ -82,7 +82,7 @@ describe("flows api", function() {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
res.text.should.eql("expected error");
|
||||
res.body.should.have.property("message","expected error");
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@@ -292,7 +292,7 @@ describe("nodes api", function() {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
res.text.should.equal("Error: test error");
|
||||
res.body.should.have.property("message","Error: test error");
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -422,7 +422,7 @@ describe("nodes api", function() {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
res.text.should.equal("Error: test error");
|
||||
res.body.should.have.property("message","Error: test error");
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -461,8 +461,7 @@ describe("nodes api", function() {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
res.text.should.equal("Invalid request");
|
||||
|
||||
res.body.should.have.property("message","Invalid request");
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -481,7 +480,7 @@ describe("nodes api", function() {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
res.text.should.equal("Invalid request");
|
||||
res.body.should.have.property("message","Invalid request");
|
||||
|
||||
done();
|
||||
});
|
||||
|
Reference in New Issue
Block a user