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

Errors when body is empty #310

Closed
MikeWilliams-UK opened this issue Mar 7, 2019 · 4 comments
Closed

Errors when body is empty #310

MikeWilliams-UK opened this issue Mar 7, 2019 · 4 comments
Labels
Milestone

Comments

@MikeWilliams-UK
Copy link
Contributor

MikeWilliams-UK commented Mar 7, 2019

If a message has no body then the message properties are not fetched.
This worked in a previous vesion.

"<16:03:29> Exception: The item argument cannot be null."
is seen in the log window if the message is double clicked on.

@MikeWilliams-UK
Copy link
Contributor Author

I have downloaded the source debugged it and tracked down how to "fix" it for us.

File $\src\ServiceBusExplorer\Helpers\JsonSerializerHelper.cs function
Function JsonSerializerHelper.IsJson at line 114

If I replace

throw new ArgumentException("The item argument cannot be null.");"

with

return false;

With this change SBE functions as it previously did with messages that have no body.

@SeanFeldman
Copy link
Collaborator

@MikeWilliams-UK sounds like a bug. Could you raise a PR and add a test to JsonSerializerHelperTest? Thank you.

@MikeWilliams-UK
Copy link
Contributor Author

Just forked the repo, going to fix and submit pr, hopefully sometime today.

@SeanFeldman
Copy link
Collaborator

Fixed via 4706ba9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants