Skip to content

Commit

Permalink
SWATCH-2903 Marketplace throws vague error when handling Default api …
Browse files Browse the repository at this point in the history
…exception

Signed-off-by: Kartik Shah <karshah@redhat.com>
  • Loading branch information
kartikshahc committed Oct 1, 2024
1 parent 4a7fe29 commit 5792ef7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,16 @@ public void process(BillableUsageAggregate billableUsageAggregate) {
billableUsageAggregate.getAggregateKey().getOrgId(),
billableUsageAggregate.getRemittanceUuids(),
billableUsageAggregate.getWindowTimestamp(),
awsUsageWindow);
awsUsageWindow,
e);
emitErrorStatusOnUsage(billableUsageAggregate, BillableUsage.ErrorCode.INACTIVE);
} else {
log.warn(
"Subscription not found for for aggregateId={} orgId={} remittanceUUIDs={}",
billableUsageAggregate.getAggregateId(),
billableUsageAggregate.getAggregateKey().getOrgId(),
billableUsageAggregate.getRemittanceUuids(),
e);
emitErrorStatusOnUsage(
billableUsageAggregate, BillableUsage.ErrorCode.SUBSCRIPTION_NOT_FOUND);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,16 @@ public void process(BillableUsageAggregate billableUsageAggregate) {
billableUsageAggregate.getAggregateKey().getOrgId(),
billableUsageAggregate.getRemittanceUuids(),
billableUsageAggregate.getWindowTimestamp(),
azureUsageWindow);
azureUsageWindow,
e);
emitErrorStatusOnUsage(billableUsageAggregate, BillableUsage.ErrorCode.INACTIVE);
} else {
log.warn(
"Subscription not found for for aggregateId={} orgId={} remittanceUUIDs={}",
billableUsageAggregate.getAggregateId(),
billableUsageAggregate.getAggregateKey().getOrgId(),
billableUsageAggregate.getRemittanceUuids(),
e);
emitErrorStatusOnUsage(
billableUsageAggregate, BillableUsage.ErrorCode.SUBSCRIPTION_NOT_FOUND);
}
Expand Down

0 comments on commit 5792ef7

Please sign in to comment.