Skip to content

Improve default auth error message to suggest setting auth_type#1603

Open
renaudhartert-db wants to merge 1 commit intodatabricks:mainfrom
renaudhartert-db:fix/1064-better-default-auth-error
Open

Improve default auth error message to suggest setting auth_type#1603
renaudhartert-db wants to merge 1 commit intodatabricks:mainfrom
renaudhartert-db:fix/1064-better-default-auth-error

Conversation

@renaudhartert-db
Copy link
Copy Markdown
Contributor

Summary

  • When no credentials strategy succeeds, the SDK returns a generic error that
    points users at the full authentication documentation page. This is unhelpful
    because it does not tell users what is actually misconfigured.
  • This change updates the error message to suggest setting auth_type, which
    causes the SDK to try a single strategy and return a specific error explaining
    exactly what is missing (e.g. "missing host" or "missing token").
  • Fixes #1064.

Test plan

  • Updated config/auth_permutations_test.go to match the new error string
  • Verified config/auth_default_test.go still passes (it uses a substring match)
  • go test ./config/... passes
  • go vet ./config/... passes
  • gofmt reports no formatting issues

When no credentials strategy succeeds, the error message now guides users
to set auth_type for a more specific error instead of pointing them at
the full authentication docs. This makes it easier to diagnose
configuration issues.

Fixes databricks#1064

Co-authored-by: Isaac
Signed-off-by: Ubuntu <renaud.hartert@databricks.com>
@github-actions
Copy link
Copy Markdown

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-go

Inputs:

  • PR number: 1603
  • Commit SHA: 0d43aeb9a8446cb05d1a1aaa1a1b1f476ee42ba4

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Better error reporting when no host parameter is provided

1 participant