reapit / foundations

Foundations platform mono repo
57 stars 22 forks source link

Appointment endpoint failing repeatedly for 2 of our customers #11033

Open au63 opened 6 months ago

au63 commented 6 months ago

url - https://platform.reapit.cloud/appointments?modifiedFrom=2024-04-16T16%3A40%3A00Z&pageSize=999999&sortBy=created

response - {"statusCode":500,"dateTime":"2024-04-16T17:42:05.0132593Z","description":"An unexpected error has been encountered when fulfilling this request. This incident has been logged and will be investigated. Please try again."}

I can share the customer codes and our app name privately through email.

Specification

github-actions[bot] commented 6 months ago

Thank you for taking the time to report a bug. We prioritise bugs depending on the severity and implications, so please ensure that you have provided as much information as possible. If you haven’t already, it really helps us to investigate the bug you have reported if you provide ‘Steps to Replicate’ and any associated screenshots. Please ensure any personal information from the production database is obscured when submitting screenshots. This issue will be reviewed in our weekly refinement sessions and assigned to a specific project board. We may also update the ticket to request additional information, if required. For more information on our processes, please click here

au63 commented 6 months ago

I also wanted to ask that if we get an E5XX for an api call with messages like above, does reapit charge us for it? Just concerned as I am building retry logic around E5XX so want to be sure that if we get repeated E5XX like we are doing now, what is the procedure to deal with it.

AshDeeming commented 6 months ago

Hi @au63

The call appears to request a substantial amount of data & may be timing out

Could you confirm the customers, please feel free to sent to sinfo@@reapitfoundations.zendesk.com

au63 commented 6 months ago

I haven't received any update on email yet. Also I have discovered that appointment api doesn't fail when we invoke that endpoint without the modifiedFrom filter. Rest of the clients seem to work fine with modifiedFrom filter ModifiedFrom filter is crucial to our business as we are working on moving from webhook to api polling system where we will call the api once every hour or 2 to get all the data that we used to previously get using webhook. But if these APIs keep failing using modifiedFrom filter, then our switch cannot be done.

AshDeeming commented 5 months ago

Zendesk 1115

au63 commented 5 months ago

Zendesk 1115

Is this some internal ticket where you are posting updates to this ticket? I tried today as well and the appointments endpoint still fails for us when I apply this filter: https://platform.reapit.cloud/appointments?modifiedFrom=2024-05-07T12%3A40%3A00Z&pageSize=1&sortBy=created This problem is forcing us to keep those 2 customers on webhooks and due to webhooks it is unnecessarily racking up our reapit bill whereas with API we could just run them a few times during the day.

image

au63 commented 5 months ago

it works fine for other customers as shown in this screenshot with just reapit-customer header changed image

plittlewood-rpt commented 5 months ago

Hi @au63 this is ultimately because of the size of the database being queried. It's something we've identified previously as being particularly problematic with this specific API and is something that we are trying to address. It's likely we might be able to make some improvements fairly quickly if the customers concerned are on a certain version of the software. We'll discuss this in our refinement session today

plittlewood-rpt commented 5 months ago

Internal ticket ref to discuss data state: SI-23675

github-actions[bot] commented 5 months ago

As this issue relates to AgencyCloud, we are unable to process this through the Platform in accordance with our Developer Processes. Issues relating to AgencyCloud should not be submitted via the Foundations GitHub repo but should be raised via the Reapit Service Desk by a Reapit Customer. Please ask a Reapit Customer to raise this issue via the Reapit Service Desk. For more information on our processes, please click here

au63 commented 5 months ago

@plittlewood-rpt I was thinking of using this which sorts modified in descending order: https://platform.reapit.cloud/appointments/?PageNumber=2&PageSize=100&sortBy=-modified and going down till we reach the modified value we were originally trying to filter from.

Also I see that sorting by modified isn't included on reapit swagger page but it seems to have worked on postman though. image

You are also free to suggest us any other algorithm for polling pages if you have done something similar.