Improved exception handlers and added support for read only secrets