-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
patch: simplify mocktr181 HandleWrp and handle empty payload case #215
patch: simplify mocktr181 HandleWrp and handle empty payload case #215
Conversation
denopink
commented
Aug 6, 2024
- support empty payload case (520 status code)
- simplify mocktr181 HandleWrp
- support empty payload case (520 status code) - simplify mocktr181 HandleWrp
statusCode = int64(520) | ||
) | ||
|
||
if len(wrpPayload) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
support empty payload case (520 status code)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #215 +/- ##
=======================================
Coverage 77.39% 77.40%
=======================================
Files 75 75
Lines 4640 4642 +2
=======================================
+ Hits 3591 3593 +2
Misses 851 851
Partials 198 198
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
) | ||
|
||
if len(wrpPayload) == 0 { | ||
return statusCode, []byte(fmt.Sprintf(`{"message": ""Invalid Input Command"", "statusCode": %d}`, statusCode)), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we say empty so we know the payload is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we would but that's the expected behavior of the old c simulator.
we're trying to match the old c simulator as close as possible