From 498f0c1f5261df73e1e8a260d2ad54d87e3754b8 Mon Sep 17 00:00:00 2001 From: Lee Wexler Date: Tue, 14 Jan 2025 17:38:06 -0500 Subject: [PATCH] Cleanup to RestController (#425) --- .../controllers/io/xh/hoist/RestController.groovy | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/grails-app/controllers/io/xh/hoist/RestController.groovy b/grails-app/controllers/io/xh/hoist/RestController.groovy index 954a1362..cfaac881 100644 --- a/grails-app/controllers/io/xh/hoist/RestController.groovy +++ b/grails-app/controllers/io/xh/hoist/RestController.groovy @@ -72,12 +72,11 @@ abstract class RestController extends BaseController { successCount++ } catch (Exception e) { failCount++ - if (e instanceof ValidationException) { - e = new io.xh.hoist.exception.ValidationException(e) - logDebug("Validation exception updating ${obj}", e) - } else { - logError("Unexpected exception updating ${obj}", e) - } + xhExceptionHandler.handleException( + exception: e, + logMessage: "Exception updating ${id}", + logTo: this + ) } }