Skip to content

Commit

Permalink
fix(api): Update .source and quota-throttler tests (#6627)
Browse files Browse the repository at this point in the history
  • Loading branch information
SokratisVidros authored Oct 4, 2024
1 parent c8d717a commit 172d172
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class ProductFeatureInterceptor implements NestInterceptor {
);

if (!enabled) {
// TODO: Reuse PaymentRequiredException from EE billing module.
throw new HttpException('Payment Required', 402);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ describe('Resource Limiting', () => {
const response = await request(pathEvent);

expect(response.status).to.equal(402);
expect(response.body.status).to.equal(402);
expect(response.body.error).to.equal('Payment required');
expect(response.body.message).to.match(
/You have exceeded the number of allowed requests for this resource\. Please visit http.+ to upgrade your subscription./
);
});
});

Expand Down

0 comments on commit 172d172

Please sign in to comment.