Page MenuHomePhabricator

Recommendation API service returns 404 on DB connection error
Closed, ResolvedPublic

Description

The Recommendation-API service returns 404 in case there's a DB connection error. 500 with details of what happened would be more appropriate. The returned error should also follow RFC7807 (see T209164)

Event Timeline

Pchelolo created this task.Dec 17 2018, 8:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 17 2018, 8:11 PM
mobrovac added a subscriber: mobrovac.

500 with details of what happened would be more appropriate.

I would argue that also setting a retry threshold would be a good idea. Say, retry to connect 2, 3 times before returning the error.

bmansurov moved this task from Backlog to Next up on the Recommendation-API board.Jan 2 2019, 2:43 PM
bmansurov added a project: Research.
bmansurov moved this task from Staged to In Progress on the Research board.Jan 3 2019, 5:06 PM

Change 482089 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/services/recommendation-api@master] Retry MySQL query in case of error

https://gerrit.wikimedia.org/r/482089

Change 482096 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/services/recommendation-api/deploy@master] Add MySQL retry config variables

https://gerrit.wikimedia.org/r/482096

Change 482096 merged by Ppchelko:
[mediawiki/services/recommendation-api/deploy@master] Add MySQL retry config variables

https://gerrit.wikimedia.org/r/482096

Change 482089 merged by Ppchelko:
[mediawiki/services/recommendation-api@master] Retry MySQL query in case of error

https://gerrit.wikimedia.org/r/482089

bmansurov closed this task as Resolved.Jan 17 2019, 7:07 PM
bmansurov moved this task from For Review to Done on the Recommendation-API board.
bmansurov moved this task from In Progress to Done (current quarter) on the Research board.