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

Refactor simplybook therapy webhook #388

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

annarhughes
Copy link
Member

@annarhughes annarhughes commented Jan 17, 2024

What changes did you make?

Refactored simplybook therapy webhook functions to include more logs and more safety checks.

Changes include:

  • client_id refactored to user_id for clarity
  • improved logging to make it clear where/why the error happened in future
  • ensured cancelled therapy reimburses the correct partner admin
  • case insensitive email filtering where: `"clientEmail" ILIKE '[email protected]' to prevent user matching errors
  • ensured fallback logic to match user to client_email or user_id is working, should solve all recent related errors

Why did you make the changes?

There have been several errors related to user not being found, likely due to case matching user.email with storyblok client_email

@annarhughes annarhughes merged commit b238f4c into develop Jan 17, 2024
3 checks passed
@annarhughes annarhughes deleted the refactor-simplybook-therapy-webhook-email-case branch January 17, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant