Making error code and message configurable