ellucian-developer / experience-ethos-examples

Example Experience Extensions which use Ethos to retrieve data from the ERP.
Apache License 2.0
29 stars 10 forks source link

Account Details DataConnect - Large Amounts of 304s #39

Open nbsaskpoly opened 1 month ago

nbsaskpoly commented 1 month ago

Hello, After an Ellucian conference, the Account Details card was advertised to some of our management as a production ready card.

I have since implemented it into our experience portal, along with the associated data connect API. The card and data connect API appear are working. We tested them quite thoroughly in our test environment

However, after releasing it to production, we are getting an overwhelming amount of 304 errors on our Ethos Integration Reports page.

First I tried to contact Ellucian Support, but they're not able to reproduce the issue and have asked me to try to contact you as to where the 304 errors are coming from, as well as how we could address them.

The case number for our support case is CSC03432766

Here is an example of the errors we are getting in our report page:

image

we are receiving an overwhelming amount of these, and it's making it a challenge to find errors from other parts of our domain.

nbsaskpoly commented 1 month ago

Not sure who told you it was "production ready". That term might mean different things to different people. It is in a repo named experience-ethos-examples. We expect them to work, but they are not officially supported.

A few of our managers went to an Ellucian conference in the spring, and there apparently were demonstrations of these cards and Ellucian staff were telling our managers they were production ready.

it looks like the har only includes successful calls to the API. Have you been able to duplicate it with a browser? Or are you just seeing it in the Ethos logs?

We are only seeing it in the Ethos logs. Whenever we try to test the functionality of the card myself it works, we have also not seen reports from any of our students or staff having problems.

ellucianBret commented 1 month ago

Has this case CSC03432766 been resolved?

nbsaskpoly commented 1 month ago

@ellucianBret

No, we're still receiving lots of errors, and we really do not know if the errors come from the BPAPI, or from the data-connect resource.

It doesn't seem to affect the results of the response from the query either, as like I said we have received no reports of the card not working for users. We just get an overwhelming amount of errors in our logs.

nbsaskpoly commented 1 month ago

@ellucianBret

I dove into the source code on github this week a bit. Specifically ellucian-developer/experience-extension-extras since the Account Details card uses the UserDataConnectQuery.

Since this repository uses react-query to make queries, I found this. React Query - query is not using cache? - Stack Overflow

I confirmed the repo project doesn't appear to be setting a staletime, so requests are always being made even though by default caching is enabled.

This, combined with Data Connect throwing 304s every time the same request is made from the same user, means that every time a page refreshes that the Report log gets extremely cluttered.

I don't believe this is intended behavior, and if it is I think it should be reconsidered. It doesn't make sense to me to allow caching, but making the request anyways, and it doesn't really make sense that 304 Not Modifed errors should be showing up in our Report Errors tab due to this functionality. At the very least, it should be togglable.