add module exception with WrongCredentialsException

This commit is contained in:
2024-09-10 00:51:09 +10:00
parent 4047ea5b9b
commit badf9f7741
4 changed files with 39 additions and 1 deletions

26
exception/pom.xml Normal file
View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>sydney.cheng</groupId>
<artifactId>ec-microservice-commons</artifactId>
<version>1.0.1-SNAPSHOT</version>
</parent>
<artifactId>ec-microservice-commons-exceptions</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,11 @@
package sydney.cheng.microservice.commons.exceptions.auth;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
@ResponseStatus(HttpStatus.UNAUTHORIZED)
public class WrongCredentialsException extends RuntimeException {
public WrongCredentialsException(String message) {
super(message);
}
}