Closed soxofaan closed 4 months ago
I just tried to trigger the "insufficient credits" problem with a test account, but there seems to be an issue so that the error is not raised. So at the moment I can not reproduce it
Issue is resolved now, and the insufficient credits error still has this (non-compliant) format (missing "code" field):
HTTP status 402 body
{"message":"You do not have sufficient credits to perform this request. Please visit https://portal.terrascope.be/pages/pricing to find more information on how to buy additional credits."}
Ideally a "code" field is added there
but we can start with handling status 402 Payment Required
Unless I'm mistaken, this needs to be fixed in the plugin that executes the credit check. From the accounting perspective, we only send execution: false
as a 200 OK response.
indeed, that's what I made https://github.com/eu-cdse/openeo-cdse-infra/issues/124 for
I decided to just pass through the original (openEO compliant) errors from upstream (on sync and batch processing), instead of wrapping everything automatically in a generic "500 Internal error"
Final part to fix the original issue here is to actually have openEO compliant error payload on "insufficient credits" event -> https://github.com/eu-cdse/openeo-cdse-infra/issues/124
@soxofaan is this still blocked?
The aggregator part was not really blocked, I was just waiting for https://github.com/eu-cdse/openeo-cdse-infra/issues/124 to finally close this ticket, which can be done now indeed
reported by @clausmichele when he hit the credits limit:
The user get a
[500] Internal: Server error
from the aggregator, but this is actually a client error (see the inner 402 code). The aggregator should not change this to a 5xx code