OpenFn / lwala

1 stars 3 forks source link

Troubleshoot `ERR_BAD_REQUEST` #117

Closed mtuchi closed 5 months ago

mtuchi commented 5 months ago

Description

  1. This timer job has been failing repeatedly over the last week - see run. Error is showing 401
  2. We have not edited the job, nor have we edited the credential… so I’m not sure why it’s failing now. Also, with this username and password, I can log into the CommCare web UI just fine… so I’m wondering if maybe the CommCare API access/permissiosn changed… but the client is not sure.
  3. To test, can you please try running this job locally to troubleshoot? I will DM you the configuration
  4. If you get it working locally --> then please fix the job on platform. If the job is NOT working locally, then please let Hildah know… I have cc’d you on the email with her. Either way, please follow up with her and try to resolve this ASAP.
mtuchi commented 5 months ago

After investigating the recent job failure, I've identified the issue causing the disruption. The Commcare baseURL now requires a trailing slash.

To fix this,We need to update the Commcare LIVE Digital Systems Admin credentials on OpenFn. Ensure that the baseUrl is appended with a trailing slash. For example:

baseUrl: https://www.commcarehq.org/a/lwala-community-alliance/api/v0.5/case/

I checked Commcare's changelog but found no mention of this alteration. However, before January 11, the job functioned well without requiring a trailing slash. It's possible that Commcare updated their server configuration, leading to the necessity of a trailing slash.

cc @aleksa-krolls Aissa

mtuchi commented 5 months ago

Closing this as it was resolved by adding a trailing slash on baseUrl