summaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-core/src/main/java/com/yahoo/restapi/RestApiException.java')
-rw-r--r--container-core/src/main/java/com/yahoo/restapi/RestApiException.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/container-core/src/main/java/com/yahoo/restapi/RestApiException.java b/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
index 68e46a3a9b8..747cf1cedeb 100644
--- a/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
+++ b/container-core/src/main/java/com/yahoo/restapi/RestApiException.java
@@ -78,4 +78,10 @@ public class RestApiException extends RuntimeException {
public Conflict(String message) { this(message, null); }
public Conflict(String message, Throwable cause) { super(ErrorResponse::conflict, message, cause); }
}
+
+ public static class Unauthorized extends RestApiException {
+ public Unauthorized() { this("Unauthorized", null); }
+ public Unauthorized(String message) { this(message, null); }
+ public Unauthorized(String message, Throwable cause) { super(ErrorResponse::unauthorized, message, cause); }
+ }
}