Add exception handling for HttpExceptions