From 564f3540e9cdc2480a1278d3a529940fbaac39db Mon Sep 17 00:00:00 2001 From: antoniotarricone Date: Mon, 5 Aug 2024 16:35:15 +0200 Subject: [PATCH] Added a constructor for one error code only w/o description. --- src/main/java/it/pagopa/swclient/mil/bean/Errors.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/it/pagopa/swclient/mil/bean/Errors.java b/src/main/java/it/pagopa/swclient/mil/bean/Errors.java index 712baf3..d915718 100644 --- a/src/main/java/it/pagopa/swclient/mil/bean/Errors.java +++ b/src/main/java/it/pagopa/swclient/mil/bean/Errors.java @@ -64,4 +64,15 @@ public Errors(String error, String description) { errors = List.of(error); descriptions = List.of(description); } + + /** + *

+ * Constructor for a single error w/o description. + *

+ * + * @param error Error code. + */ + public Errors(String error) { + errors = List.of(error); + } }