Unexpected 409 / Exception:null with api/tracker

DHIS version: 2.37
Endpoint: /api/tracker
Parameters: async=false&importMode=VALIDATE&atomicMode=OBJECT&importStrategy=CREATE_AND_UPDATE&reportMode=FULL
Number of events: 10

Hi all, I am hoping someone can help me with this head scratcher:
I am experiencing some behavior I would like to understand better when validating data I am pushing for an event program.
For the purpose of the example, assume the usual event payload and one of the data values is a data element with an option set.

When I have unvalid options, the response has status code 200, status OK and errorReports as I would expect. There are stats for the import.

200 {'status': 'OK', 'validationReport': {'errorReports': [{'message': 'Value force_error is not a valid option for ABC123DEF DataElement in option set A,B,C,D,E,F ... ]}, 'stats': {'created': 0, 'updated': 0, 'deleted': 0, 'ignored': 10, 'total': 10}, ... }

I fixed these with valid options, the response now has status code 409, status Error and no errorReports. The message is Exception:null.

409 {'status': 'ERROR', 'validationReport': {'errorReports': [], 'warningReports': []}, 'timingsStats': {'timers': {'preheat': '0.107719 sec.', 'preprocess': '0.000121 sec.', 'validation': '0.011811 sec.', 'programrule': '0.045140 sec.', 'totalImport': '0.260019 sec.'}}, 'message': 'Exception:null'}

What does this mean? The fact that both error and warning reports are empty ('errorReports': [], 'warningReports': []) is particularly puzzling. To me it implies that the conflict is not directly related to the data payload.

Any thoughts? Thank you!

1 Like

Hi @theo_hf

Would try to import these in debugging mode and dry run using the Import/Export app in the same instance? What is the error that you see? If you don’t see an error and only repeating network requests in the Network tab in the DevTools then this could be related to this bug: [DHIS2-12345] - Jira … if you see an error when importing using the Import/Export app, it’d be interesting to know what the error is.

I see that you are using version 2.37, but the fix is for 40.2 (released), 2.39.4 and 2.38.6 (unreleased yet). I recommend testing on https://play.dhis2.org/40.2.0 and see if you get the same response?

I hope these tips help… if they don’t please post back and I will try to reproduce the whole issue on several versions on the play.dhis2.org site.

Thanks!

1 Like

Hi @Gassim, thank you for taking the time to answer.

When trying the import export app, the dry run shows no errors with the events from the import that gives the 409 status code. No repeated network requests though.

I will test on 40.2,see what happens and get back to you.

1 Like

So this means that the same payload from the import/export app is working? Or simply no errors but nothing is being imported? Would it be possible to get the network request that is being sent in the app?

Thanks! Have you gotten the chance to have a look?