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

_Exception: Exception: Could not add price: {"proof":["Proof does not belong to the current user. Adding a pr... #6068

Open
sentry-io bot opened this issue Dec 21, 2024 · 8 comments

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 21, 2024

Sentry Issue: SMOOTHIE-560

_Exception: Exception: Could not add price: {"proof":["Proof does not belong to the current user. Adding a price to a proof a user does not own is only allowed for {proof_constants.TYPE_ALLOW_ANY_USER_PRICE_ADD_LIST} proofs"]}
  File "stacktrace_utils.dart", line 10, in getCurrentStackTrace
  File "sentry_exception_factory.dart", line 44, in SentryExceptionFactory.getSentryException
  File "sentry_client.dart", line 235, in SentryClient._prepareEvent
  File "sentry_client.dart", line 119, in SentryClient.captureEvent
  File "hub.dart", line 173, in Hub.captureException
@monsieurtanuki
Copy link
Contributor

cc @raphodn @raphael0202
Probably related to #6061

@monsieurtanuki
Copy link
Contributor

Top 3 sentry error this week.

@raphael0202
Copy link

The front-end keeps trying to send the price even if we return an HTTP 4XX, right?
When looking at "all events" (https://openfoodfacts.sentry.io/issues/6119899378/events/?cursor=0%3A100%3A1&project=5376745&referrer=github_integration), it looks like many errors are associated to the same client, in a row.

@monsieurtanuki
Copy link
Contributor

@raphael0202 And that will go on forever, as we don't have a way in Smoothie to say: "hey, eventually we haven't done what you asked". We just keep trying.
Maybe in 2025?

@raphael0202
Copy link

And that will go on forever, as we don't have a way in Smoothie to say: "hey, eventually we haven't done what you asked". We just keep trying.

In my opinion, the front-end should drop the task if the server returns an HTTP 4XX. We should only keep trying again if it's a 5XX.

@monsieurtanuki
Copy link
Contributor

In my opinion, the front-end should drop the task if the server returns an HTTP 4XX. We should only keep trying again if it's a 5XX.

The user assumes that the (background) task will eventually be processed; that's what we're selling anyway.
After a couple of years and many many comments, I still wasn't able to plead for a decent UX feedback when a background task is obviously wrong and should be terminated. Maybe with your help...

@raphael0202
Copy link

The user assumes that the (background) task will eventually be processed; that's what we're selling anyway.

Yes, but sending incorrect (as expected by the API) requests forever is not an option. Stopping to perform these requests is more important (in my opinion).

@monsieurtanuki
Copy link
Contributor

Yes, but sending incorrect (as expected by the API) requests forever is not an option. Stopping to perform these requests is more important (in my opinion).

Makes sense. But:

  1. should we warn the user, and if yes, how?
  2. how should we detect those failing tasks? Just by assuming that a task that fails n times, and not for obvious internet connection/server 5xx errors, is to be automatically canceled? (even more acceptable if we warn the user, cf. 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Status: 💬 To discuss and validate
Development

No branches or pull requests

3 participants