Skip to content

Commit

Permalink
style: spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
kdomo committed Nov 28, 2023
1 parent 2c88d29 commit 67dc51f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
13 changes: 4 additions & 9 deletions src/main/java/com/depromeet/global/error/ErrorResponse.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
package com.depromeet.global.error;

import java.time.LocalDateTime;

import org.springframework.http.HttpStatus;

public record ErrorResponse(
int status,
String message,
LocalDateTime timestamp
) {
public record ErrorResponse(int status, String message, LocalDateTime timestamp) {

public static ErrorResponse of(HttpStatus status, String message) {
return new ErrorResponse(status.value(), message, LocalDateTime.now());
}
public static ErrorResponse of(HttpStatus status, String message) {
return new ErrorResponse(status.value(), message, LocalDateTime.now());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
@AllArgsConstructor
public class CustomException extends RuntimeException {

private final ErrorCode errorCode;
private final ErrorCode errorCode;
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
package com.depromeet.global.error.exception;

import org.springframework.http.HttpStatus;

import lombok.AllArgsConstructor;
import lombok.Getter;
import org.springframework.http.HttpStatus;

@Getter
@AllArgsConstructor
public enum ErrorCode {
SAMPLE_ERROR(HttpStatus.BAD_REQUEST, "Sample Error Message"),
;

SAMPLE_ERROR(HttpStatus.BAD_REQUEST, "Sample Error Message"),
;

private final HttpStatus status;
private final String message;
private final HttpStatus status;
private final String message;
}

0 comments on commit 67dc51f

Please sign in to comment.