File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/main/java/com/gravatar/services Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -750,6 +750,11 @@ public final class com/gravatar/services/GravatarResult$Success : com/gravatar/s
750750 public fun toString ()Ljava/lang/String;
751751}
752752
753+ public final class com/gravatar/services/HttpException : java/lang/RuntimeException {
754+ public final fun getCode ()I
755+ public fun getMessage ()Ljava/lang/String;
756+ }
757+
753758public final class com/gravatar/services/ProfileService {
754759 public static final field LOG_TAG Ljava/lang/String;
755760 public fun <init> ()V
Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ import retrofit2.Response
55/* *
66 * Exception thrown when an HTTP error occurs in a non-cathing method.
77 *
8- * [rawErrorBody] The raw error body of the response.
98 * [code] The HTTP status code.
9+ * [message] The HTTP status message.
1010 */
11- internal class HttpException internal constructor(response : Response <* >) : RuntimeException() {
12- val rawErrorBody: String? = response.errorBody()?.string()
13- val code: Int = response.code()
11+ public class HttpException internal constructor(response : Response <* >) : RuntimeException() {
12+ internal val rawErrorBody: String? = response.errorBody()?.string()
13+ public val code: Int = response.code()
14+ public override val message: String = " HTTP ${response.code()} $rawErrorBody "
1415}
You can’t perform that action at this time.
0 commit comments