- 
                Notifications
    You must be signed in to change notification settings 
- Fork 748
feat: Wrap and pass SQL Errors #6498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| The latest updates on your projects. Learn more about Vercel for GitHub. 
 | 
| Breaking changes detected in the OpenAPI specification! | 
| Breaking changes detected in the OpenAPI specification! | 
        
          
                marimo/_sql/error_utils.py
              
                Outdated
          
        
      | import duckdb | ||
|  | ||
| if isinstance( | ||
| exception, (duckdb.duckdb.ParserException, duckdb.ProgrammingError) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we handle catalog errors as well (duckdb might call them BinderErrors)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Covered by ProgrammingError
        
          
                marimo/_sql/error_utils.py
              
                Outdated
          
        
      | """Check if the exception is a SQL parsing error.""" | ||
| # Check for DuckDB exceptions first (most common) | ||
| try: | ||
| import duckdb | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we do DependencyManager.duckdb.imported() to avoid the import if not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
db51e77    to
    b254618      
    Compare
  
    for more information, see https://pre-commit.ci
| Breaking changes detected in the OpenAPI specification! | 
    
      
        1 similar comment
      
    
  
    | Breaking changes detected in the OpenAPI specification! | 
| Breaking changes detected in the OpenAPI specification! | 
    
      
        1 similar comment
      
    
  
    | Breaking changes detected in the OpenAPI specification! | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI is failing
e05afcd    to
    7fdf30d      
    Compare
  
    for more information, see https://pre-commit.ci
| Breaking changes detected in the OpenAPI specification! | 
    
      
        1 similar comment
      
    
  
    | Breaking changes detected in the OpenAPI specification! | 
| merging even though is breaks main, in order to unblock other folks | 
📝 Summary
Starting point to format SQL errors in a bit more friendly manner. @Light2Dark let me know if you want to take over this branch, or create a PR against it.
Not sure what's up with my codegen? I can cherry pick the commit if it's a little too noisy.