Skip to content

Instantly share code, notes, and snippets.

@thomaskioko
Created July 25, 2023 11:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thomaskioko/1dc0863c9cb09097ebd8c2589b2aa8d8 to your computer and use it in GitHub Desktop.
Save thomaskioko/1dc0863c9cb09097ebd8c2589b2aa8d8 to your computer and use it in GitHub Desktop.
when (statusCode) {
in 300..399 -> throw RedirectResponseException(response)
in 400..499 -> throw ClientRequestException(response)
in 500..599 -> throw ServerResponseException(response)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment