Skip to content

Conversation

@andreasohlund
Copy link
Member

@andreasohlund andreasohlund commented Dec 9, 2025

This PR makes the code more picky about the results from the metrics API and also throws if the API call indicates an error

@andreasohlund andreasohlund added this to the 1.32.0 milestone Dec 10, 2025
@andreasohlund andreasohlund added the enhancement New feature or request label Dec 10, 2025
@andreasohlund andreasohlund enabled auto-merge (squash) December 10, 2025 11:37
@andreasohlund
Copy link
Member Author

@mauroservienti made some more tweaks to the output, can you take a final look?

Copy link
Member

@mauroservienti mauroservienti left a comment

Choose a reason for hiding this comment

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

Minor tweak; otherwise, looks good


if (metricQueryResult is null)
{
throw new Exception("No metrics query results returned for Microsoft.ServiceBus/Namespace");
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
throw new Exception("No metrics query results returned for Microsoft.ServiceBus/Namespace");
throw new Exception($"No metrics query results returned for {MicrosoftServicebusNamespacesMetricsNamespace}");

Copy link
Member Author

Choose a reason for hiding this comment

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

oops, I had it to automerge, will apply it to master

@andreasohlund andreasohlund merged commit 3374b11 into main Dec 10, 2025
5 checks passed
@andreasohlund andreasohlund deleted the better-exception-management branch December 10, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants