From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation
---
fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/exceptions/CommonAttributNotExistException.java | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/exceptions/CommonAttributNotExistException.java b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/exceptions/CommonAttributNotExistException.java
new file mode 100644
index 0000000..58417af
--- /dev/null
+++ b/fdx-commons/fdxcommons-tools/src/main/java/com/megatim/fdxcommons/tools/exceptions/CommonAttributNotExistException.java
@@ -0,0 +1,30 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package com.megatim.fdxcommons.tools.exceptions;
+
+import javax.ejb.EJBTransactionRolledbackException;
+import javax.ejb.Singleton;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.ext.ExceptionMapper;
+import javax.ws.rs.ext.Provider;
+
+/**
+ *
+ * @author bissey
+ */
+@Provider
+@Singleton
+public class CommonAttributNotExistException implements ExceptionMapper<EJBTransactionRolledbackException> {
+
+ @Override
+ public Response toResponse(EJBTransactionRolledbackException exception) {
+ return Response.status(Response.Status.BAD_REQUEST)
+ .entity(exception.getMessage()).type(MediaType.APPLICATION_JSON).build();
+// .entity("Cet Attribut N'existe pas dans cette Ressource").type(MediaType.APPLICATION_JSON).build();
+ }
+
+}
--
Gitblit v1.10.0