Created
August 5, 2020 01:26
-
-
Save mlescaille/4fb8118257afbdfc5d8c8c73b13a436e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grails.artefact.Enhances | |
import org.grails.core.artefact.ControllerArtefactHandler | |
@Enhances(ControllerArtefactHandler.TYPE) //you can do the same with ServiceArtefactHandler.TYPE | |
trait ExceptionHandler { | |
def handleControllerError(Exception e) { | |
response.status = 400 | |
render ApiError.unknownError as JSON | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment