-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89a60e5
commit e49194a
Showing
4 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...in/java/org/pythonbyte/haveibeenkwned/service/exceptions/KPasswordlessRequestException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.pythonbyte.haveibeenkwned.service.exceptions | ||
|
||
import com.squareup.okhttp.Response; | ||
|
||
class KpasswordlessServiceException(response: Response, requestAlias: String) : RuntimeException() { | ||
val code: Int = response.code() | ||
val responseMessage: String = response.message() | ||
val responseBody: String = response.body().string().trim() | ||
val requestAlias: String = requestAlias; | ||
|
||
override val message: String? | ||
get() = "KpasswordlessServiceException: $requestAlias request failed with code [$code] [$responseMessage] json [$responseBody]" | ||
} |