upcoming: [DPS-33210] Handle creation and edit for stream and destination - #12823
Merged
Conversation
mduda-akamai
marked this pull request as ready for review
September 5, 2025 13:40
mduda-akamai
requested review from
bnussman-akamai and
cpathipa
and removed request for
a team
September 5, 2025 13:40
Comment on lines
+62
to
+72
| .catch((error) => { | ||
| return enqueueSnackbar( | ||
| getAPIErrorOrDefault( | ||
| error, | ||
| 'There was an issue creating your destination' | ||
| )[0].reason, | ||
| { | ||
| variant: 'error', | ||
| } | ||
| ); | ||
| }); |
Member
There was a problem hiding this comment.
Do we need to handle field errors returned by the API?
Contributor
Author
There was a problem hiding this comment.
Do you mean like this?
const { field, reason } = getAPIErrorOrDefault(
error,
'There was an issue creating your destination'
)[0];
const message = field ? `${field}: ${reason}` : reason;
return enqueueSnackbar(message, {
variant: 'error',
});Or perhaps you know a better way to handle this?
Member
There was a problem hiding this comment.
Usually we do something like this:
Contributor
There was a problem hiding this comment.
I've added field errors as in example from you. And left snackbars with simple text message as it is something we want to show.
Comment on lines
+130
to
+138
| } catch (error) { | ||
| enqueueSnackbar( | ||
| getAPIErrorOrDefault( | ||
| error, | ||
| `There was an issue ${mode === 'create' ? 'creating' : 'editing'} your stream` | ||
| )[0].reason, | ||
| { variant: 'error' } | ||
| ); | ||
| } |
Member
There was a problem hiding this comment.
Same thing here. Do we need to handle field errors that the API may return?
Contributor
There was a problem hiding this comment.
same here in 2 places. For destination creation and for stream creation part
…t-for-stream-and-destination # Conflicts: # packages/manager/src/features/DataStream/Streams/StreamForm/Clusters/StreamFormClusters.test.tsx
5 tasks
Cloud Manager UI test results🎉 746 passing tests on test run #6 ↗︎
|
bnussman-akamai
approved these changes
Sep 16, 2025
cpathipa
approved these changes
Sep 16, 2025
This was referenced Sep 17, 2025
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.
Changes 🔄
Scope 🚢
Upon production release, changes in this PR will be visible to:
Target release date 🗓️
First half of September 2025 / devcloud
Preview 📷
How to test 🧪
Prerequisites
(How to setup test environment)
Verification steps
Author Checklists
As an Author, to speed up the review process, I considered 🤔
👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
📱 Providing mobile support
As an Author, before moving this PR from Draft to Open, I confirmed ✅