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

mobrovac subscribed.

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.

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 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.