code: def test_extract_errors() -> None:
      """
      Test that custom error messages are extracted correctly.
      """
  
      from superset.db_engine_specs.athena import AthenaEngineSpec
  
      msg = ": mismatched input 'fromm'. Expecting: "
      result = AthenaEngineSpec.extract_errors(Exception(msg))
      assert result == [
          SupersetError(
              message='Please check your query for syntax errors at or near "fromm". Then, try running your query again.',
              error_type=SupersetErrorType.SYNTAX_ERROR,
              level=ErrorLevel.ERROR,
              extra={
                  "engine_name": "Amazon Athena",
                  "issue_codes": [
                      {
                          "code": 1030,
                          "message": "Issue 1030 - The query has a syntax error.",
                      }
                  ],
              },
          )
      ]
  
file_path: superset/tests/unit_tests/db_engine_specs/test_athena.py
imports: import re
  from datetime import datetime
  from typing import Optional
  import pytest
  from superset.errors import ErrorLevel, SupersetError, SupersetErrorType
  from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm
  from tests.unit_tests.fixtures.common import dttm
label_desc: Use image node_id 2 for calling a global function with example usage: test_extract_errors() without return types