Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

W-16629236: Cannot convert MessagingException to JSON using DW #14195

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

marianorean
Copy link
Contributor

No description provided.

@marianorean marianorean marked this pull request as ready for review February 3, 2025 20:52
@marianorean marianorean requested a review from a team as a code owner February 3, 2025 20:52
@marianorean
Copy link
Contributor Author

--validate

1 similar comment
@marianorean
Copy link
Contributor Author

--validate

try {
getDetailedFailuresMethod = RoutingResult.class.getMethod("getFailuresWithExceptionInfo");
detailedFailures =
(Map<String, Pair<Error, EventProcessingException>>) getDetailedFailuresMethod.invoke(routingResult);
(Map<String, Pair<Error, MuleException>>) getDetailedFailuresMethod.invoke(routingResult);
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the only cast to EventProcessingException that we have in the code, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

If the tests pass, please monitor anyway uber during a week to see if something related to this is failing that was not caught by hawk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is the only case it brings an issue.

Copy link
Contributor

@IvanAndresFritzler IvanAndresFritzler left a comment

Choose a reason for hiding this comment

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

Since this is a DW issue (not reading the API fields only when you pass a mixed API / non API object) it should be fixed with only changing EventProcessingException (the mixed one) to MuleException (the API one). No extra code changes should be needed.

Map<String, Pair<Error, MuleException>> failedRoutesErrorWithExceptionMap = errorMap.entrySet().stream()
.collect(Collectors
.toMap(Entry::getKey,
pair -> new Pair<>(pair.getValue().getFirst(), getRootMuleException(pair.getValue().getSecond()))));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are you adding getRootMuleException here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See previous comment.

Copy link

SonarQube Quality Gate

Quality Gate failed

Failed condition 58.3% Line Coverage on New Code (is less than 80%)

See analysis details on SonarQube

@marianorean
Copy link
Contributor Author

--validate

@marianorean marianorean merged commit 8bff808 into master Feb 6, 2025
7 of 8 checks passed
@marianorean marianorean deleted the fix/W-16629236 branch February 6, 2025 19:57
@marianorean marianorean changed the title fix/W-16629236: Cannot convert MessagingException to JSON using DW W-16629236: Cannot convert MessagingException to JSON using DW Feb 6, 2025
marianorean added a commit that referenced this pull request Feb 7, 2025
marianorean added a commit that referenced this pull request Feb 7, 2025
marianorean added a commit that referenced this pull request Feb 10, 2025
aiannucci pushed a commit that referenced this pull request Feb 10, 2025
…14195)

Signed-off-by: Alejandro Iannucci <4360246+aiannucci@users.noreply.github.com>
marianorean added a commit that referenced this pull request Feb 11, 2025
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.

3 participants