Skip to content

Conversation

@xabg2
Copy link
Collaborator

@xabg2 xabg2 commented May 21, 2025

Changes on this PR

  • Implemented tax collection logic for new object storage subscriptions, aligning with our billing requirements.
  • Updated JWT handling to skip verification for public object storage routes.
  • Removed unused or deprecated endpoints related to legacy object storage flows.
  • Refactored route structure to follow best practices and improve clarity and maintainability.

@xabg2 xabg2 self-assigned this May 21, 2025
@xabg2 xabg2 added the enhancement New feature or request label May 21, 2025
@xabg2 xabg2 marked this pull request as ready for review May 22, 2025 08:46
@xabg2 xabg2 requested a review from sg-gs as a code owner May 22, 2025 08:46
}
try {
const { id } = await paymentService.createOrGetCustomer(
const userExists = await paymentService.getCustomerIdByEmail(email).catch(() => null);
Copy link
Member

Choose a reason for hiding this comment

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

Assuming a NotFoundError is the only thing it may fail is risky and can have side-effects like duplicating customers silently (because if error -> user does not exist, then, it should be created) due to unexpected errors. It is advisable to check if it is a NotFound and then return null or else, let the error propagate or handle it appropiately

@xabg2
Copy link
Collaborator Author

xabg2 commented May 22, 2025

⚠️ Note: This PR depends on this SDK PR, as it introduces breaking changes.
Please ensure the updated SDK version is available and integrated on the client side before merging this PR.

sg-gs
sg-gs previously approved these changes May 22, 2025
@sg-gs
Copy link
Member

sg-gs commented May 22, 2025

The tests seem to be failing @xabg2

@sonarqubecloud
Copy link

@xabg2 xabg2 merged commit c4148dc into master May 22, 2025
8 of 10 checks passed
@xabg2 xabg2 deleted the feat/apply-taxes-to-object-storage branch May 22, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request ready-for-preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants