digitalfabrik / entitlementcard

App for 'Digitale Berechtigungskarten', generally benefit card for volunteers or socially vulnerable groups in Germany. App for Android & iOS + Backend + Administration Web Portal – 100% Open Source.
MIT License
36 stars 3 forks source link

Error log if there are no applications #1223

Open f1sh1918 opened 11 months ago

f1sh1918 commented 11 months ago

Describe the bug Receive an error log when fetching data for /application and /verification

To Reproduce Steps to reproduce the behavior:

  1. create an application
  2. click on the mail link to view your application
  3. remove some chars from the magic link
  4. Error can be found in the backend log

Expected behavior

LOG

Nov 22 13:46:39 entitlementcard.tuerantuer.org backend[120716]: [JettyServerThreadPool-620] ERROR app.ehrenamtskarte.backend.common.webservice.GraphQLExceptionHandler - Exception while fetching data (/application) : null
f1sh1918 commented 11 months ago

@sarahsporck the only place where we use /application is for the applicant view attachment

michael-markl commented 6 months ago

@sarahsporck the only place where we use /application is for the applicant view attachment

I am pretty sure, this log does not come from the application attachment endpoint (because this would not generate a graphql error afaics). The /application in the graphql error message says, that the graphql endpoint could not retrieve the property application of the specified query/mutation. Queries that have this property:

The solution would be to find where the exception is thrown and instead do a proper error handling, I think?

f1sh1918 commented 6 months ago

it is thrown when the passed accessKey can't be found in the database and that happens if a broken link was opened

f1sh1918 commented 6 months ago

i just updated the steps to reproduce. This error is probably connected with broken links the user may receive via mail. I gonna block this issue due to this pr https://github.com/digitalfabrik/entitlementcard/pull/1378 which maybe solves the issue or at least let it less occur.

f1sh1918 commented 2 months ago

we still have link 60-80 logs within 24hours. Probably due to broken link. We could check if the accessKey length is valid, before we send a request or do you think its okay to just keep it like that?

f1sh1918 commented 2 months ago

are there any opinions to that @michael-markl , @ztefanie or @seluianova

michael-markl commented 2 months ago

Is this the only thing that is logged?

Nov 22 13:46:39 entitlementcard.tuerantuer.org backend[120716]: [JettyServerThreadPool-620] ERROR app.ehrenamtskarte.backend.common.webservice.GraphQLExceptionHandler - Exception while fetching data (/application) : null
f1sh1918 commented 2 months ago

yes we could maybe try to add a log for the accessKey that is used

f1sh1918 commented 2 months ago

added logging with #1553 until we have further information about this issue -> blocked