From 3df49e016cebfbf0f7818efd09ed024b9103120e Mon Sep 17 00:00:00 2001
From: KronosDP <darrel.danadyaksa19@gmail.com>
Date: Wed, 26 Feb 2025 13:51:23 +0700
Subject: [PATCH] [GREEN] Add ErrorResponse DTO for standardized error handling
 in API responses

---
 .../authentication/dto/ErrorResponse.java     | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/main/java/com/safetypin/authentication/dto/ErrorResponse.java

diff --git a/src/main/java/com/safetypin/authentication/dto/ErrorResponse.java b/src/main/java/com/safetypin/authentication/dto/ErrorResponse.java
new file mode 100644
index 0000000..e7bb410
--- /dev/null
+++ b/src/main/java/com/safetypin/authentication/dto/ErrorResponse.java
@@ -0,0 +1,25 @@
+package com.safetypin.authentication.dto;
+
+import lombok.Data;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.time.LocalDateTime;
+
+@Data
+@Getter
+@Setter
+@NoArgsConstructor
+public class ErrorResponse{
+    private int status;
+    private String message;
+    private LocalDateTime timestamp;
+
+    public ErrorResponse(int status, String message) {
+        this.status = status;
+        this.message = message;
+        this.timestamp = LocalDateTime.now();
+    }
+
+}
\ No newline at end of file
-- 
GitLab