Closed aleksa-krolls closed 2 years ago
@aleksa-krolls there was an error with typo preventing from throwing error. This is fixed and I updated the job to use the last version : https://www.openfn.org/projects/p5am6e/runs/0617046a-d490-7b37-91b3-7cf0bc32f2e2
I updated the others also.
@lakhassane Okay, cool. Noted re: v2.3.4
!
Now can you help me solve the 500
error :-)
This was working before... see example successful run below:
https://www.openfn.org/projects/p5am6e/runs/06168c23-52ed-728d-907e-9ff85d13cf25
@lakhassane Quoin confirmed that the way we should query cases by case_id
will be the same (e.g., /api/v2/cases?case_id=a884ef1e-768d-417e-a203-2481bd3c7c90
), so the approach and adaptor should stay the same. But I will let you know when the API bug is resolved so that you can continue work on this issue.
@lakhassane Quoin has deployed fix that will allow you to query by case_id
so please resume this issue. E.g., GET '/api/v2/cases?case_id=e118082a-068f-47e1-96e2-31f9e8f7353b'
@aleksa-krolls if they deployed the fix this issue should auto-solve I would say. Im having a green check here: https://www.openfn.org/projects/p5am6e/runs/06181305-b1c5-77c9-bb7d-415da46b3a7b
But no cases. Also not hitting 500
with postman anymore.
@lakhassane It looks like this case_id
query doesn't work if cases were created before the patch fix. I've reached out to Quoin.
cc @daissatou2 pls ask me about this
In the meantime, I have it working for a more recent case here: https://www.openfn.org/projects/p5am6e/runs/061813fb-3cad-7e6f-a32b-1a39bdf9c21d
Request: If case is NOT found, can you please throw an error and force the job to fail with the error No case found. Referral decision cannot be synced
?
Here is a sample state: https://www.openfn.org/projects/p5am6e/messages/0616ecab-5cae-7297-ab0e-5a9c19b4d3a2
@aleksa-krolls throwing error when case not found: https://www.openfn.org/projects/p5am6e/runs/06181a4d-cdad-7066-956a-d1940c80efbc
@lakhassane Looking great, thank you!
Describe the bug
See the false success run: https://www.openfn.org/projects/p5am6e/runs/0616ecab-7553-7af0-abf6-5708f4b129a4
To Reproduce
Feel free to re-run on prod. We expect this to find the matching case & referral... and update the referral status in Primero.
adaptor
language-primero@2.3.3
expression.js
jobs/2.c.uploadDecisionsV2.js
state.json
See LP for
Primero Gambella open_function API user
https://www.openfn.org/projects/p5am6e/messages/0616ecab-5cad-7810-b6d0-9cf8011c19d4