Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cache when we have time out with navitia. #44

Merged
merged 1 commit into from Feb 20, 2024

Conversation

Netmisa
Copy link
Member

@Netmisa Netmisa commented Feb 20, 2024

Description

Fix cache when we have time out with navitia.

Reference

@pthegner pthegner merged commit 6aeb3c2 into master Feb 20, 2024
2 checks passed
@pthegner pthegner deleted the fix_timeout_in_cache branch February 20, 2024 15:40
$ch = new CurlService($url, $this->timeout, $token, $this->logger);
$result = $ch->process();
$this->cache->setCacheItem($cacheKey, $result);
if ($result['httpCode'] === 200) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should update this line to
if ($result['httpCode'] === 200 && $result['response'] !== false && empty($result['errorMsg'])) {
to avoid this case (a 200 response but with a timeout error) :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants