diff --git a/log.txt b/log.txt index 273796fb..d142919d 100644 --- a/log.txt +++ b/log.txt @@ -45,3 +45,7 @@ The last packet sent successfully to the server was 0 milliseconds ago. The driv The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. | Context: Establishing database connection [2026-03-02 13:02:48] [INSERT] DB_INSERT | Table: sale | ID: Refund ID: 24 | Details: Created refund for sale ID 23 with 1 items, total: $240.00 +[2026-03-07 17:50:34] [ERROR] EXCEPTION | Location: LoginController.btnLoginClicked | Type: MismatchedInputException | Message: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`) + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1] | Context: Authentication attempt for username: staff +[2026-03-07 17:50:34] [ERROR] EXCEPTION | Location: LoginController.btnLoginClicked | Type: MismatchedInputException | Message: Cannot deserialize value of type `java.lang.String` from Array value (token `JsonToken.START_ARRAY`) + at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1] | Context: Authentication attempt for username: staff diff --git a/src/main/java/org/example/petshopdesktop/api/ApiClient.java b/src/main/java/org/example/petshopdesktop/api/ApiClient.java index e8f5a2b4..9563fae3 100644 --- a/src/main/java/org/example/petshopdesktop/api/ApiClient.java +++ b/src/main/java/org/example/petshopdesktop/api/ApiClient.java @@ -22,6 +22,7 @@ public class ApiClient { .build(); this.objectMapper = new ObjectMapper(); this.objectMapper.registerModule(new JavaTimeModule()); + this.objectMapper.configure(com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); this.baseUrl = ApiConfig.getInstance().getBaseUrl(); }