Skip to content

ModeledError does not exist in smithy_core.exceptions #560

Description

@nemec

When I generate either a client or types the code generator creates a sample ServiceError (no errors / exception types are defined in my model itself)

from smithy_core.exceptions import ModeledError

class ServiceError(ModeledError):
    """Base error for all errors in the service.

    Some exceptions do not extend from this class, including
    synthetic, implicit, and shared exception types.
    """

However, when I use it I get:

ImportError: cannot import name 'ModeledError' from 'smithy_core.exceptions'

I'm not sure if the source for smithy_core is published on Github, but downloading the package from PyPI provides an exceptions.py file which does not include a ModeledError class at all. For the time being I'll try to replace ModeledError with SmithyException post-build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions