keep consistency in API response, debug into error object
add method is_json into thread-local request object