package com.github.dhavalmehta1997.savetogoogledrive.exception;

import org.springframework.http.HttpStatus;

public class ApiException extends RuntimeException {
    private HttpStatus status;

    public ApiException(HttpStatus status) {
        this(status, null, null);
    }

    public ApiException(HttpStatus status, String message) {
        this(status, message, null);
    }

    public ApiException(HttpStatus status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    public ApiException(HttpStatus status, Throwable cause) {
        this(status, null, cause);
    }

    public ApiException(HttpStatus status, String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.status = status;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public void setStatus(HttpStatus status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "ApiException{" +
                "status=" + status +
                '}';
    }
}

@@ -156,20 +156,69 @@
 ption %7B%0A
-    
+%0A%09private static final long serialVersionUID = 1L;%0A%0A%09
 private 
@@ -237,20 +237,17 @@
 tatus;%0A%0A
-    
+%09
 public A
@@ -275,32 +275,26 @@
 s status) %7B%0A
-        
+%09%09
 this(status,
@@ -303,35 +303,29 @@
 ull, null);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public ApiEx
@@ -365,32 +365,26 @@
  message) %7B%0A
-        
+%09%09
 this(status,
@@ -400,27 +400,21 @@
  null);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public A
@@ -475,32 +475,26 @@
 le cause) %7B%0A
-        
+%09%09
 super(messag
@@ -500,32 +500,26 @@
 ge, cause);%0A
-        
+%09%09
 this.status 
@@ -524,35 +524,29 @@
 s = status;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public ApiEx
@@ -587,32 +587,26 @@
 le cause) %7B%0A
-        
+%09%09
 this(status,
@@ -620,27 +620,21 @@
 cause);%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public A
@@ -723,17 +723,20 @@
 ression,
- 
+%0A%09%09%09
 boolean 
@@ -757,24 +757,18 @@
 race) %7B%0A
-        
+%09%09
 super(me
@@ -821,24 +821,18 @@
 Trace);%0A
-        
+%09%09
 this.sta
@@ -841,35 +841,29 @@
 s = status;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public HttpS
@@ -878,32 +878,26 @@
 tStatus() %7B%0A
-        
+%09%09
 return statu
@@ -899,27 +899,21 @@
 status;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 public v
@@ -947,24 +947,18 @@
 atus) %7B%0A
-        
+%09%09
 this.sta
@@ -975,19 +975,13 @@
 us;%0A
-    %7D%0A%0A    
+%09%7D%0A%0A%09
 @Ove
@@ -986,20 +986,17 @@
 verride%0A
-    
+%09
 public S
@@ -1014,24 +1014,18 @@
 ing() %7B%0A
-        
+%09%09
 return %22
@@ -1040,32 +1040,16 @@
 tion%7B%22 +
-%0A               
  %22status
@@ -1065,34 +1065,15 @@
 us +
-%0A               
  '%7D';%0A
-    
+%09
 %7D%0A%7D%0A

add serial version UID