{"id":9728,"library":"exasol-error-reporting","title":"Exasol Error Reporting","description":"Exasol Error Reporting is a Python library designed to standardize error messages with structured error codes, messages, and mitigation hints. It ensures uniformity across applications by enforcing a specific error code format. The current version is 1.1.0, and it follows an active release cadence, typically updating dependencies and addressing security concerns as needed.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/exasol/error-reporting-python","tags":["error reporting","exasol","logging","exceptions","developer tools"],"install":[{"cmd":"pip install exasol-error-reporting","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"note":"The package was renamed from 'exasol-error-reporting-python' to 'exasol-error-reporting' in version 0.4.0. The module path also changed accordingly.","wrong":"from exasol_error_reporting_python import ExaError","symbol":"ExaError","correct":"from exasol.error_reporting import ExaError"}],"quickstart":{"code":"from exasol.error_reporting import ExaError\n\ndef my_faulty_function(param_value):\n    if param_value is None:\n        raise ExaError(\"E-TEST-1\", \"Input parameter 'param_value' must not be None.\") \\\n            .add_mitigation(\"Provide a valid non-null value for 'param_value'.\") \\\n            .add_parameter(\"received_value\", \"None\")\n    return f\"Processed: {param_value}\"\n\n# Example Usage:\ntry:\n    my_faulty_function(None)\nexcept ExaError as e:\n    print(f\"Caught ExaError: {e.error_code} - {e.message}\")\n    for mitigation in e.mitigations:\n        print(f\"  Mitigation: {mitigation}\")\n    for param, value in e.parameters.items():\n        print(f\"  Parameter {param}: {value}\")\n\ntry:\n    result = my_faulty_function(\"hello\")\n    print(result)\nexcept ExaError as e:\n    print(f\"Unexpected error: {e}\")","lang":"python","description":"This quickstart demonstrates how to define and raise an `ExaError` with a structured error code, message, mitigation hints, and additional parameters. It also shows how to catch and inspect the `ExaError` object."},"warnings":[{"fix":"Upgrade your Python environment to 3.10 or newer. The library requires Python >=3.10, <4.0.","message":"Python 3.9 support was dropped.","severity":"breaking","affected_versions":">=1.1.0"},{"fix":"Update your `pip install` command and all import statements from `exasol_error_reporting_python` to `exasol.error_reporting`.","message":"The package name and import path changed from `exasol-error-reporting-python` to `exasol-error-reporting`.","severity":"breaking","affected_versions":">=0.4.0"},{"fix":"Ensure error codes follow the pattern `E-<THREE_LETTER_COMPONENT>-<NUMBER>`, where `E` is fixed, the component is three uppercase letters, and the number is an integer.","message":"Error codes must adhere to a specific format (e.g., `E-ABC-1`). Incorrect formats will raise a `ValueError`.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Update your `pip install` command to `pip install exasol-error-reporting` and change all import statements from `from exasol_error_reporting_python import ...` to `from exasol.error_reporting import ...`.","cause":"The Python package was renamed from `exasol-error-reporting-python` to `exasol-error-reporting` in version 0.4.0. Your code is likely using the old import path.","error":"ModuleNotFoundError: No module named 'exasol_error_reporting_python'"},{"fix":"Ensure you are using the modern `ExaError(code, message)` constructor. Refer to the quickstart example for current usage.","cause":"This error can occur if you are using an older API pattern with a newer version of the library. The API was reworked in 0.4.0.","error":"TypeError: ExaError.__init__() got an unexpected keyword argument 'error_code'"},{"fix":"Correct the error code to follow the specified format, ensuring the component part (e.g., 'TEST' in 'E-TEST-1') consists of exactly three uppercase letters.","cause":"The error code provided does not match the required pattern `E-<THREE_LETTER_COMPONENT>-<NUMBER>` (e.g., `E-TEST-1`). The component part must be exactly three uppercase letters.","error":"ValueError: Invalid error code format 'E-XX-123'"}]}