error handler and application response code and message