jscheffl commented on PR #46406:
URL: https://github.com/apache/airflow/pull/46406#issuecomment-2637943390

   > Here, `result` is also something that comes from the server. So, the issue 
is actually is at the server end and not the client. 400 would be ideal if 
there's some issue with what the client sent, 4xx stands for client side errors.
   > 
   > Does that make sense?
   
   Sorry for the delayed response. That all makes sense that it is then not a 
4xx as the XCom value is "broken" in the DB and can not be de-serialized. I 
would ask myself how it got in there but... 500 also gives me the impression 
that something on the server side is "broken". But also restarting does not 
help. The given data point is corrupt.
   
   Question for me would be, in case we can not de-serialize... should we 
directly delete it? Or do we keep it for manual recovery?
   
   If it would be deleted to clean broken stuff, then HTTP 410 might be fitting 
to purpose.
   
   Otherwise following the discussion in 
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm
 I assume 422 might be a good response code to signal this error. Even if it is 
a server content issue and not a client issue. I see no 5xx error code which 
would be matching otherwise.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to