From 2a0855a33f9cf49c0305057cd59d6a5aade7e7cc Mon Sep 17 00:00:00 2001 From: Arne Limburg Date: Thu, 17 Aug 2023 09:49:40 +0200 Subject: [PATCH] fix: Fix error handling for invalid delivery addresses --- .../address/infrastructure/ValidationExceptionHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/customer-service/src/main/java/de/openknowledge/sample/address/infrastructure/ValidationExceptionHandler.java b/customer-service/src/main/java/de/openknowledge/sample/address/infrastructure/ValidationExceptionHandler.java index aa6660e..222ebfd 100644 --- a/customer-service/src/main/java/de/openknowledge/sample/address/infrastructure/ValidationExceptionHandler.java +++ b/customer-service/src/main/java/de/openknowledge/sample/address/infrastructure/ValidationExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 open knowledge GmbH + * Copyright 2019 - 2023 open knowledge GmbH * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ */ package de.openknowledge.sample.address.infrastructure; +import javax.enterprise.context.ApplicationScoped; import javax.validation.ValidationException; import javax.ws.rs.core.Context; import javax.ws.rs.core.Response; @@ -23,6 +24,7 @@ import javax.ws.rs.ext.Provider; @Provider +@ApplicationScoped public class ValidationExceptionHandler implements ExceptionMapper { private static final String PROBLEM_JSON_TYPE = "application/problem+json";