Hi, you can follow these steps in the MS document to override error messages using a Trigger or RequestHandler.
Please noted that not all request handler logic is exposed for customization. If you want to customize any business logic and if that request handler is not overridable, then create a support ticket or log a request in the LCS extensibility tool.