An application service is separated from the technology hosting the service but by throwing the right exception the correct HTTP status will be returned when hosting it as a REST service.
This default functionality can be overridden by creating an ExceptionFilter and registering it. TODO
Throw AbpValidationException
Throwing AbpAuthorizationException will return Unauthorized if there's a session user.
Throwing AbpAuthorizationException will return Forbidden if there's no session user.
Throw EntityNotFoundException