[RJA-1790] [fix] - Rest returns error code 500 instead of 403
Merge pull request #811 from rsvato/agents

[RJA-1790] [fix] - Rest returns error code 500 instead of 403