Skip to content

Fix Azure Error Handling#1390

Merged
joe-elliott merged 5 commits intografana:mainfrom
joe-elliott:fix-azure-error
Apr 15, 2022
Merged

Fix Azure Error Handling#1390
joe-elliott merged 5 commits intografana:mainfrom
joe-elliott:fix-azure-error

Conversation

@joe-elliott
Copy link
Copy Markdown
Collaborator

What this PR does:
In certain cases we were not correctly translating errors from ABS into backend.ErrDoesNotExist. This PR corrects that issue by doing the following:

  • Update readError to descend wrapped errors to find errors of type blob.StorageError
  • Removes the wrapping that was causing the initial issue. It didn't add anything of value.
  • Appropriate testing added

Which issue(s) this PR fixes:
Fixes the other part of #1372 along with #1389

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
Signed-off-by: Joe Elliott <number101010@gmail.com>
@mdisibio mdisibio added this to the v1.4 milestone Apr 15, 2022
Header: http.Header{
textproto.CanonicalMIMEHeaderKey("x-ms-error-code"): []string{serviceCode},
},
Request: httptest.NewRequest("GET", "/blobby/blob", nil), // azure error handling code will panic if Request is unset
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:blob-nod:

@joe-elliott joe-elliott merged commit 9608447 into grafana:main Apr 15, 2022
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.

2 participants