requireSuccessStatusCode

fun requireSuccessStatusCode(response: <Error class: unknown class>)

Throws a UnexpectedResponseException if the response status code isn't 2xx. If the response body includes JSON with an array for the key "errors" or a string for the key "detail", then those messages are included in the exception message.