Skip to content

Commit

Permalink
default error context added
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam2680 committed Oct 3, 2024
1 parent f084243 commit 63454ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/databricks/sql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import logging

BIT_MASKS = [1, 2, 4, 8, 16, 32, 64, 128]
DEFAULT_ERROR_CONTEXT = "Unknown error"

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -360,7 +361,7 @@ def user_friendly_error_message(self, no_retry_reason, attempt, elapsed):
try:
error_context = str(self.error)
except:
error_context = ""
error_context = DEFAULT_ERROR_CONTEXT

return user_friendly_error_message + ". " + error_context

Expand Down

0 comments on commit 63454ae

Please sign in to comment.