[Security Solution] [Case] Fixes "Case connector cannot be updated when created with a wrong field"#87223
Merged
stephmilovic merged 6 commits intoelastic:masterfrom Jan 5, 2021
Merged
Conversation
stephmilovic
commented
Jan 4, 2021
| return ''; | ||
| } | ||
| if (typeof errorResponse === 'string') { | ||
| // Jira error.response.data can be string!! |
Contributor
Author
There was a problem hiding this comment.
@cnasikas not sure what the response was looking like for other errors, but for 401 data was a string
Member
There was a problem hiding this comment.
@stephmilovic Nice catch! In their API it says that they return an ErrorCollection that is an object for 400, 401, 403
cnasikas
reviewed
Jan 5, 2021
x-pack/plugins/actions/server/builtin_action_types/jira/service.test.ts
Outdated
Show resolved
Hide resolved
cnasikas
reviewed
Jan 5, 2021
x-pack/plugins/case/server/routes/api/cases/configure/get_configure.test.ts
Outdated
Show resolved
Hide resolved
cnasikas
reviewed
Jan 5, 2021
x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx
Outdated
Show resolved
Hide resolved
cnasikas
reviewed
Jan 5, 2021
x-pack/plugins/security_solution/public/cases/containers/configure/use_configure.test.tsx
Outdated
Show resolved
Hide resolved
Member
|
Very good PR. I really liked your approach and the tests! I found the following:
|
Contributor
Author
|
@elasticmachine merge upstream |
cnasikas
approved these changes
Jan 5, 2021
YulNaumenko
approved these changes
Jan 5, 2021
Contributor
YulNaumenko
left a comment
There was a problem hiding this comment.
Alerting changes LGTM!
Contributor
💚 Build SucceededMetrics [docs]Async chunks
Distributable file count
Page load bundle
History
To update your PR or re-run it, just comment with: |
stephmilovic
added a commit
to stephmilovic/kibana
that referenced
this pull request
Jan 5, 2021
…en created with a wrong field" (elastic#87223)
stephmilovic
added a commit
to stephmilovic/kibana
that referenced
this pull request
Jan 5, 2021
…en created with a wrong field" (elastic#87223)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
Fixes #86768
Bug fixes issue where case connector cannot be updated when created with a wrong field. Now when there is a problem fetching mappings (needs connector to work, aka have correct fields), we are allowing the configure post/patch/get to complete and swallowing the error, but returning it with the configure and showing it in a toaster, informing the user of the problem.

I also persist a little error message in the UI for the mappings:
.
There was also a small issue with our
createErrorMessagefunction for reporting Jira authentication failure errors that I fixed to make the error make sense.Checklist
Delete any items that are not applicable to this PR.