-
Notifications
You must be signed in to change notification settings - Fork 646
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
It looks like in 3.929.0 there was a large refactor(#7485). Registering a middleware in the deserialization step doesn't return the deserialized data any longer.
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
@aws-sdk/[email protected]
Which JavaScript Runtime is this issue in?
Node.js
Details of the browser/Node.js/ReactNative version
n/a
Reproduction Steps
Register a middleware with step of deserialize with priority of low. Make an InvokeModelCommand of ConverseConverse command call with @aws-sdk/client-bedrock-runtime'.
Observed Behavior
I see the result as the ClientHttp2Stream, not deserialized.
Expected Behavior
In the middleware I expect to see the deserialize body
Possible Solution
No response
Additional Information/Context
It seems like this middleware is getting called after that actually does the deserialization. The priority isn't documented but it seems like if I change my middleware to priority high the result of my middleware and the chain is properly serialized. But it feels like it's defeating the purpose of defining a middleware with a step of deserializeif the deserialization happens in a middleware as well now