Closed mehulgohil-tal closed 2 months ago
Hi @mehulgohil-tal ,
Thanks for reaching out.
This smells like other media-* services where INTs and LONGs are modeled without the required
trait.
OffsetMillis which is the member in question, is referred to twice in the model:
once with the required trait
and once without the required trait
Since the SDK is code generated from the model, and that lack of trait means that the SDK does not explicitly serialize 0 values, this is an issue that needs to be solved upstream with the media tailor service itself.
I will discuss this with the team, verify and then create an internal ticket with the service team.
To unblock you, you will need to create a middleware that will manually write that 0 value to the request to circumvent the serialization logic. You can find an example here.
Let us know if you need any help with the workaround. Thanks again, Ran~
Thanks @RanVaknin for the quick reply. I have applied my custom middleware similar to what you have shown, and working as expected.
Is this issue going to be resolved going forward ? or I have to continue with this workaround ?
This is a discrepancy between the service's API model and its actual behavior, much like the various cases of aws/aws-sdk-go-v2#2162.
We will need to upstream this issue with the appropriate service team to pursue a fix.
We have created a ticket with the MediaTailor service team P115786494
.
Moving to cross SDK repo for tracking.
Ran~
This should be solved now. Can you please update the SDK and see if this solves your issue?
Thanks, Ran~
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Describe the bug
I am creating a Program in Mediatailor Channel. Using
CreateProgram
method. I am trying to add anAd break
at start of the program. Basically Offset0
. But the SDK is returning error statingoperation error MediaTailor: CreateProgram, https response error StatusCode: 400, RequestID: 4b6d0fc7-c074-418f-bf2d-75ab598cfd78, api error BadRequestException: OffsetMillis cannot be missing.
.While offset
0
works fine when inserted from AWS ConsoleExpected Behavior
The Program Should be created in channel with AD Break inserted at offset
0
Current Behavior
Giving Error
operation error MediaTailor: CreateProgram, https response error StatusCode: 400, RequestID: 4b6d0fc7-c074-418f-bf2d-75ab598cfd78, api error BadRequestException: OffsetMillis cannot be missing.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
v1.33.1
Compiler and Version used
go1.21.4
Operating System and version
Windows 11