support custom status code and message