at-return-output #63

Merged
lash merged 7 commits from at-return-output into master 2024-09-19 18:23:13 +02:00
Member

Updated the code to only show output if the http response code is 200

From the AT documentation:

If we get a HTTP error response (Code 40X) from your script, or a malformed response (does not begin with CON or END), we will terminate the USSD session gracefully.

Based on this, I see it best to return an error response instead of having a success response of 200, leading to an empty result if the menu encountered any errors

Updated the code to only show output if the http response code is 200 From the AT documentation: > If we get a HTTP error response (Code 40X) from your script, or a malformed response (does not begin with CON or END), we will terminate the USSD session gracefully. Based on this, I see it best to return an error response instead of having a success response of 200, leading to an empty result if the menu encountered any errors
Alfred-mk added 2 commits 2024-09-18 14:32:58 +02:00
Alfred-mk requested review from lash 2024-09-18 14:34:32 +02:00
lash requested changes 2024-09-18 14:41:03 +02:00
Dismissed
lash left a comment
Owner

Add a test please?

Add a test please?
Alfred-mk changed title from at-return-output to WIP: at-return-output 2024-09-18 14:43:33 +02:00
Alfred-mk added 1 commit 2024-09-18 14:43:54 +02:00
Alfred-mk added 3 commits 2024-09-19 16:24:41 +02:00
Alfred-mk added 1 commit 2024-09-19 17:52:41 +02:00
Author
Member

Add a test please?

This has been done

I have also moved the mocks package for easier usage

> Add a test please? This has been done I have also moved the mocks package for easier usage
Alfred-mk requested review from lash 2024-09-19 17:57:39 +02:00
Alfred-mk changed title from WIP: at-return-output to at-return-output 2024-09-19 17:57:46 +02:00
lash approved these changes 2024-09-19 18:22:55 +02:00
lash left a comment
Owner

Very nice, great efforts on the mocking.

I haven't independently verified that it addresses the issue with the 500, but taking your word that it does.

I have verified that tests run and that it builds.

And that coverage after this PR is nearly 90%

Very nice, great efforts on the mocking. I haven't independently verified that it addresses the issue with the 500, but taking your word that it does. I have verified that tests run and that it builds. And that coverage after this PR is nearly 90%
lash merged commit 929e812992 into master 2024-09-19 18:23:13 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: urdt/ussd#63
No description provided.