Skip to content

Commit 9ef2ad3

Browse files
feat: add ErrorResponse
1 parent c42b30d commit 9ef2ad3

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
<central-publishing-maven-plugin.version>0.7.0</central-publishing-maven-plugin.version>
5858

5959
<!-- Dependency versions -->
60+
<lombok.version>1.18.38</lombok.version>
6061
<moshi.version>1.15.2</moshi.version>
6162
</properties>
6263

@@ -66,10 +67,29 @@
6667
<artifactId>moshi</artifactId>
6768
<version>${moshi.version}</version>
6869
</dependency>
70+
<dependency>
71+
<groupId>org.projectlombok</groupId>
72+
<artifactId>lombok</artifactId>
73+
<version>${lombok.version}</version>
74+
<scope>provided</scope>
75+
</dependency>
6976
</dependencies>
7077

7178
<build>
7279
<plugins>
80+
<plugin>
81+
<groupId>org.apache.maven.plugins</groupId>
82+
<artifactId>maven-compiler-plugin</artifactId>
83+
<configuration>
84+
<annotationProcessorPaths>
85+
<path>
86+
<groupId>org.projectlombok</groupId>
87+
<artifactId>lombok</artifactId>
88+
<version>${lombok.version}</version>
89+
</path>
90+
</annotationProcessorPaths>
91+
</configuration>
92+
</plugin>
7393
<!-- Central publishing plugin -->
7494
<plugin>
7595
<groupId>org.sonatype.central</groupId>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package dev.resms.exception;
2+
3+
public class ReSMSException extends RuntimeException {
4+
public ReSMSException(String message) {
5+
super(message);
6+
}
7+
8+
public ReSMSException(String message, Throwable cause) {
9+
super(message, cause);
10+
}
11+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package dev.resms.model;
2+
3+
import lombok.Getter;
4+
5+
@Getter
6+
public class ErrorResponse {
7+
private String status;
8+
private ErrorDetails error;
9+
10+
@Getter
11+
public static class ErrorDetails {
12+
private String name;
13+
private String message;
14+
}
15+
}

0 commit comments

Comments
 (0)