-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
55 changed files
with
1,595 additions
and
750 deletions.
There are no files selected for viewing
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
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
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
7 changes: 3 additions & 4 deletions
7
src/main/java/com/example/demo/config/errors/exception/Exception401.java
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.utils.ApiUtils; | ||
import com.example.demo.config.utils.ApiResponseBuilder; | ||
import lombok.Getter; | ||
import org.springframework.http.HttpStatus; | ||
|
||
@Getter | ||
public class Exception401 extends RuntimeException { | ||
public Exception401(String message) { | ||
super(message); | ||
} | ||
|
||
public ApiUtils.ApiResponse<?> body(){ | ||
return ApiUtils.error(getMessage()); | ||
public ApiResponseBuilder.ApiResponse<?> body(){ | ||
return ApiResponseBuilder.error(getMessage()); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
src/main/java/com/example/demo/config/errors/exception/Exception403.java
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.utils.ApiUtils; | ||
import com.example.demo.config.utils.ApiResponseBuilder; | ||
import lombok.Getter; | ||
import org.springframework.http.HttpStatus; | ||
|
||
@Getter | ||
public class Exception403 extends RuntimeException { | ||
public Exception403(String message) { | ||
super(message); | ||
} | ||
|
||
public ApiUtils.ApiResponse<?> body(){ | ||
return ApiUtils.error(getMessage()); | ||
public ApiResponseBuilder.ApiResponse<?> body(){ | ||
return ApiResponseBuilder.error(getMessage()); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
src/main/java/com/example/demo/config/errors/exception/Exception404.java
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.utils.ApiUtils; | ||
import org.springframework.http.HttpStatus; | ||
import com.example.demo.config.utils.ApiResponseBuilder; | ||
|
||
public class Exception404 extends RuntimeException { | ||
public Exception404(String message) { | ||
super(message); | ||
} | ||
|
||
public ApiUtils.ApiResponse<?> body(){ | ||
return ApiUtils.error(getMessage()); | ||
public ApiResponseBuilder.ApiResponse<?> body(){ | ||
return ApiResponseBuilder.error(getMessage()); | ||
} | ||
} |
7 changes: 3 additions & 4 deletions
7
src/main/java/com/example/demo/config/errors/exception/Exception500.java
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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
package com.example.demo.config.errors.exception; | ||
|
||
import com.example.demo.config.utils.ApiUtils; | ||
import com.example.demo.config.utils.ApiResponseBuilder; | ||
import lombok.Getter; | ||
import org.springframework.http.HttpStatus; | ||
|
||
@Getter | ||
public class Exception500 extends RuntimeException { | ||
public Exception500(String message) { | ||
super(message); | ||
} | ||
|
||
public ApiUtils.ApiResponse<?> body() { | ||
return ApiUtils.error(getMessage()); | ||
public ApiResponseBuilder.ApiResponse<?> body() { | ||
return ApiResponseBuilder.error(getMessage()); | ||
} | ||
} |
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
Oops, something went wrong.