Sometimes when you make an Ushahidi API call to submit a report, the report is successfully uploaded to the server but then something else happens and the server returns an unexpected response. At the moment, we use the status code returned by the server to determine if the report successfully got uploaded then delete the pending report on the app.
Now to determine if the report was successfully created is the issue, since the Ushahidi API doesn't return the created report's ID.
Question: Just delete the pending report on the app when there is no status code from the server? or flag the pending report as unknown status so the user takes the appropriate action? -- Delete the report manually.
Sometimes when you make an Ushahidi API call to submit a report, the report is successfully uploaded to the server but then something else happens and the server returns an unexpected response. At the moment, we use the status code returned by the server to determine if the report successfully got uploaded then delete the pending report on the app.
Now to determine if the report was successfully created is the issue, since the Ushahidi API doesn't return the created report's ID.
Question: Just delete the pending report on the app when there is no status code from the server? or flag the pending report as unknown status so the user takes the appropriate action? -- Delete the report manually.