Skip to content

[Epic] Move exception handling to event system #1

@nathaniel-may

Description

@nathaniel-may

Problem:

  1. The way exceptions are raised often the only way to distinguish them when catching is to match on the string message. Updating wording of exceptions is a frequent community-driven improvement but has high risk of changing our exception handling anywhere in the system.
  2. User-facing string formatting is decentralized and often would require painstaking string parsing to extract important values if downstream code wanted to render the exception differently. Here is an example of this problem with ansi characters: (Issue) (Originating Exception)
  3. Catching exceptions from warehouse drivers often uses the string matching strategy as well. This leaves our exception handling strategy dependent on warehouse language settings being set to English. Exceptions are not properly handled for other languages. Example for Japanese.

Goals:

  • near zero risk of modifying exception messages
  • catching errors works across all warehouse language settings

Possible Solution:

  • leverage the event subsystem for exceptions as well

Relevant chain of tickets for dbt-core

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleMark an issue or PR as stale, to be closed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions