floydspace / effect-aws

🚰 Effectful AWS
https://floydspace.github.io/effect-aws/
MIT License
39 stars 4 forks source link

Unexpected typed error "`AccessDeniedException`" #56

Closed dudeofawesome closed 2 months ago

dudeofawesome commented 2 months ago

I'm experiencing this "AccessDeniedException" typed expected error when using the Secrets Manager client; however, Effect does not believe that this error can exist.

Here's a reproduction of the error.

floydspace commented 2 months ago

I'll have a look, thanks for reporting

joepjoosten commented 2 months ago

Same goes for "ThrottlingException". I get this on the aws cloudwatch-log sdk on "DeleteLogStream" request. According to the smithy spec (https://github.com/aws/aws-sdk-js-v3/blob/0899e938946741970e9bb4ad27c4ec8966ccbc09/codegen/sdk-codegen/aws-models/cloudwatch-logs.json#L1388) this shouldn't happen, but i think this is a general throttling exception. Can't find any documentation about a general limit for the aws api. Maybe it should be added to every operation?

joepjoosten commented 2 months ago

Found some info: https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html

floydspace commented 2 months ago

The issue is that some errors are defined by peer packages, so it is why they are not generated. and it is really hard to identify which errors (besides explicitly defined) can be raised in the client functions. I'm currently working on solution so we only handle errors which it is expected by effect-aws, anything else would fall to SdkError, so at least it behaves as it is defined. and then I will think about how to include peer errors

floydspace commented 2 months ago

Hey @dudeofawesome this issue should be fixed in @effect-aws/client-secrets-manager@1.1.0

dudeofawesome commented 2 months ago

Thanks so much! Can't wait to check it out.