Page MenuHomePhabricator

ORES should return an http error status code for timeouts
Closed, DeclinedPublic

Description

We currently respond with a status code 200. I think we should send 504, "gateway timeout".

[pid: 29865] 208.80.154.22 (-) {32 vars in 497 bytes} [Tue Sep 12 00:22:46 2017] GET /v3/scores/enwiki/12345678/damaging => generated 303 bytes in 15220 msecs (HTTP/1.1 200) 6 headers in 208 bytes (1 switches on core 0) user agent "curl/7.38.0"

{
  "enwiki": {
    "models": {
      "damaging": {
        "version": "0.3.0"
      }
    },
    "scores": {
      "12345678": {
        "damaging": {
          "error": {
            "message": "Timed out after 15 seconds.",
            "type": "TimeoutError"
          }
        }
      }
    }
  }
}

Event Timeline

It's quite possible that some subset of revision-scores will timeout. In this case, I think 200 makes sense.