-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Issues with empty PollForDecisionTask and PollForActivityTask responses #257
Comments
Workaround I'm using for now is to wrap the polling: checkSerializeError :: MonadXXX m => Error -> m ()
checkSerializeError = \case
e@(SerializeError s) -> do
unless check $ throwM e where
check =
s ^. serializeStatus == ok200 &&
s ^. serializeAbbrev == "SWF" &&
s ^. serializeMessage == "key \"taskToken\" not present"
e -> throwM e
xxx :: MonadXXX m => m ()
xxx =
handle checkSerializeError $ do
poll stuff But yuck. |
Great, thanks for going the extra mile with the details @mfine. I'll get it fixed shortly. |
And by shortly I mean two weeks! Apologies for the belated fix. Please have a look at #260 and let me know if that should cover both cases. I'll update the tests/properties separately to ensure regression is avoided in the future. |
Thanks! Nice solution - sorry it had to come to that :( Will check things out! |
Running into issues with empty polls where de-serialization fails because SWF doesn't seem to be conforming to its models:
Failing
Empty PollForDecisionTask (FAIL)
Empty PollForActivityTask (FAIL)
Passing
Non-Empty PollForDecisionTask (PASS)
Non-Empty PollForActivityTask (PASS)
I'm confused because the models for both indicate these are mandatory attributes:
https://github.com/brendanhay/amazonka/blob/develop/gen/model/swf/2012-01-25/service-2.json#L812-L818
https://github.com/brendanhay/amazonka/blob/develop/gen/model/swf/2012-01-25/service-2.json#L1745-L1753
Looking around in other related SDKs (e.g., aws-sdk-go), there's mention of the fields coming back as
nil
(which I think is how their JSON parsers will work in the absence of a field). It's almost like maybe there are no required fields - everything should be Maybe :(The text was updated successfully, but these errors were encountered: