Skip to content

Commit

Permalink
fix: error handling in case of return code 502 (eveseat#88)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3e38f0b)
  • Loading branch information
Rakdos8 authored and warlof committed Jul 14, 2023
1 parent 1acec3e commit de8e62c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Containers/EsiResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ public function __construct(string $data, array $headers, string $expires, int $
$this->error_message .= ': ' . $data->error_description;
}

// If the query failed to contact the ESI endpoint
if ($this->response_code === 502)
$this->error_message = 'Bad gateway';

// Run the parent constructor
parent::__construct($data, ArrayObject::ARRAY_AS_PROPS);
}
Expand Down

0 comments on commit de8e62c

Please sign in to comment.