Skip to content

Error Handling (Specifically ProgrammingError handling) #80

@mattdavis17

Description

@mattdavis17

Driver version

redshift_connector==2.0.902

Problem description

Everything is working like expected so this is not a "this is terrible" post. I'm trying to figure out how to handle errors when trying to execute a statement. The statement in question is "CREATE USER ____ WITH PASSWORD ____" where I am connected to a redshift cluster. If the user isn't there, all is great! When the user is there, I need to handle that error. I just can't seem to figure out error handling in that response. I notice that there is a returned class (`<class 'redshift_connector.error.ProgrammingError'>) and this is totally fine. I just want to know how I can handle those errors in a programmatic way. Is there any documentation on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions