fix(ingest): raise errors in more cases in rest sink#2638
Conversation
| raise OperationalError( | ||
| "Unable to parse response from ingestion sink", | ||
| {"message": str(parse_exception)}, | ||
| ) from e |
There was a problem hiding this comment.
Since we're in except HTTPError as e:, we know that response.raise_for_status() will certainly throw here - probably want to remove that line since we already have it in e
We're actually not interested in the parse_exception since it just means that the response body wasn't json. Instead, we should set message to the response.text itself
|
I encountered a case where I fed in a json MCE file to rest api. I then checked mysql, the entries did not make it into the database; but the entries were recorded into Elasticsearch. |
|
@xiphl This is very concerning, and we've not seen it before. Please let us know if you experience this issue again |
|
Closing as #2800 supercedes this. |
Rest sink would occasionally swallow HTTP errors. Now, if they get a 404 say, the rest sink outputs:
Checklist