kgabryje commented on code in PR #34674:
URL: https://github.com/apache/superset/pull/34674#discussion_r2300950869


##########
superset/custom_database_errors.py:
##########
@@ -0,0 +1,49 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import re
+from typing import Any
+
+from superset.errors import SupersetErrorType
+
+# CUSTOM_DATABASE_ERRORS: Configure custom error messages for database 
exceptions.
+# Transform raw database errors into user-friendly messages with optional 
documentation
+# links using custom_doc_links. Set show_issue_info=False to hide default 
error codes.
+# Example:
+# CUSTOM_DATABASE_ERRORS = {
+#     "trino": {
+#         re.compile(r'message="(?P<message>[^"]*)"'): (

Review Comment:
   Could we perhaps make it easier to append a custom message or just the doc 
links to the original message? I know that this regex does that, but who likes 
writing regexes 😄 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to