DostEducation / RP_IVR_analytics

This is a cloud function based webhook processing service that is being using to get webhook calls from RapidPro to capture different analytical data point.
GNU Affero General Public License v3.0
4 stars 1 forks source link

IVR prompt not found for some of the 'partner_code' names #490

Open Sachinbisht27 opened 1 month ago

Sachinbisht27 commented 1 month ago

Describe the bug We are receiving error logs on the monitoring dashboard for a few partner code names that these partner code names are not added to the database.

Add diagnosis details On Diagnosis, we found that these partner code names are not added to the database.

Error text payload:

sourceLocation: {
file: "/workspace/api/services/prompt_service.py"
function: "handle_prompt_response"
line: "51"
}
spanId: "4b0464ff5ef3d973"
split: null
textPayload: "IVR prompt not found for name 'partner_code' and response 'kanpur_nagar'"
timestamp: "2024-10-24T10:01:32.729260Z"
trace: "projects/cryptic-gate-211900/traces/b8dd3b318b58a6c06b4557f7e99dee96"
traceSampled: false
}

Expected behavior

Screenshots image

Additional context NA

Root cause

Action items

Criticality Medium

Acceptance Criteria

Documentation Add whatever documentation will be required here.

Sachinbisht27 commented 2 weeks ago

Diagnosis Report

Issue Summary
We noticed error logs in the monitoring dashboard indicating that some partner codes are missing from the database. This causes issues when trying to process IVR (Interactive Voice Response) prompts for these partner codes.

What We Found
After checking, we discovered that these specific partner codes were not added to the database, which led to the system being unable to process the IVR prompts correctly.

Error Details
Here’s the error message we received:

This indicates that the partner code "kanpur_nagar" is not available in the database.

What Should Happen
All partner codes must be pre-loaded into the database with the correct names. This ensures that the system can process user responses and keypresses without any errors.

Root Cause
The partner code "kanpur_nagar" was added to RapidPro but wasn’t added to the database table (IVR_prompt). As a result, when the system compared user responses to the database, it couldn’t find a match.

Impact