Improve access denied handling. Handle active record not found exceptions