Skip to content

Commit

Permalink
Merge pull request #184 from amadeus4dev/update-comparisons
Browse files Browse the repository at this point in the history
Update comparisons
  • Loading branch information
minjikarin authored Jan 9, 2023
2 parents e7ff3ad + fc60493 commit d297228
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/amadeus/client/listener.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ class Listener {
errorFor({statusCode, parsed}) {
let error = null;
if (statusCode >= 500) { error = ServerError; }
else if (statusCode == 401) { error = AuthenticationError; }
else if (statusCode == 404) { error = NotFoundError; }
else if (statusCode === 401) { error = AuthenticationError; }
else if (statusCode === 404) { error = NotFoundError; }
else if (statusCode >= 400) { error = ClientError; }
else if (!parsed) { error = ParserError; }
else { error = UnknownError; }
Expand Down
2 changes: 1 addition & 1 deletion src/amadeus/client/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class Response {
*/
parse() {
try {
if (this.statusCode == 204) {
if (this.statusCode === 204) {
return;
}
if (this.isJson()) {
Expand Down

0 comments on commit d297228

Please sign in to comment.