cancel
Showing results for 
Search instead for 
Did you mean: 

Error handling in ActionExecuter

asiro
Champ in-the-making
Champ in-the-making
Hi all,

Having a client which posts file via the /alfresco/service/api/upload and having some application logic in a rule (implemented in Java, extending ActionExecuterAbstractBase) what is the way to communicate meaningfull errors back to client if the rule detects some error condition?

Throwing an exception returns an Http 500, instead I would like to send and error message via JSON for example.

Thx,
  Alex
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
Assuming you are executing the action synchronously you can set a Result in the action properties.   There's a few examples that already do this.

asiro
Champ in-the-making
Champ in-the-making
Sorry, didn't get it.

Could you be more specific/indicate the example.

Thank you.

mirko79
Champ in-the-making
Champ in-the-making
Sorry, didn't get it.

Could you be more specific/indicate the example.

Thank you.

Hi asiro,
have you found some examples?

thank you