diff --git a/src/main/java/org/ntlab/acanthus_server/resources/gallery/EditorsRest.java b/src/main/java/org/ntlab/acanthus_server/resources/gallery/EditorsRest.java index 10fbc9b..007c4b9 100644 --- a/src/main/java/org/ntlab/acanthus_server/resources/gallery/EditorsRest.java +++ b/src/main/java/org/ntlab/acanthus_server/resources/gallery/EditorsRest.java @@ -7,6 +7,7 @@ import javax.ws.rs.*; import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; import java.util.Collection; @Component @@ -30,7 +31,8 @@ return new EditorJson(editorList); }else{ //aid間違っている時のレスポンス - throw new WebApplicationException(401); + var response = Response.status(401).entity("aidが間違っています"); + throw new WebApplicationException(response.build()); } } @@ -48,7 +50,8 @@ animation.restWorkToEditors(account); } else { //ユーザーID、トークンが間違っている時のレスポンス - throw new WebApplicationException(401); + var response = Response.status(401).entity("アニメーションid, ユーザーid,トークンのどれかが間違っています"); + throw new WebApplicationException(response.build()); } } }