Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 62d2a17

Browse files
authored
Merge pull request #79 from microservices-demo/check-status-code
Check response status code
2 parents 31e7c34 + 55db39b commit 62d2a17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/orders/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
async.waterfall([
5959
function (callback) {
6060
request(endpoints.customersUrl + "/" + custId, function (error, response, body) {
61-
if (error) {
61+
if (error || response.status_code === "500") {
6262
callback(error);
6363
return;
6464
}

0 commit comments

Comments
 (0)