shunping commented on PR #40404:
URL: https://github.com/apache/beam/pull/40404#issuecomment-6066044563

   > Hey @shunping, it's really not clear from this PR. I also opened a few 
other fixes around and all of them are related to a custom runner I am working 
on which is based on Prism. The Job API only gives the failure as text, and I 
would like some kind of error code. In my implementation I put an error class 
on message_id (I guess also not the best fit) so the submitter can treat that 
as an error id and decide what to do. Today WaitForCompletion already prints 
this id, so I thought it would be ok to return it as well, so I won't need to 
fork runnerlib. If you have another suggestion I can try something else =) 
Thanks for the review
   
   I see. Since you are implementing a custom runner, have you considered 
incorporating the status code directly into the error string, like `[404] File 
not found`? You could then have a helper function to parse it on your end. I 
think overloading message_id to represent a message class sounds a bit weird 
since that's not its intended purpose.


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