private Optional<StructureShape> getStructure(Model model, ToShapeId id) {
        return model.getShape(id.toShapeId()).flatMap(Shape::asStructureShape);
    }
Gets the list of error structures defined on an operation,
including any common errors inherited from a service shape.

<p>An empty list is returned if the operation is not found or
has no errors.

@param service Service shape to inherit common errors from.
@param operation Operation to get the errors of.
@return Returns the list of error structures, or an empty list.
smithy-model/src/main/java/software/amazon/smithy/model/knowledge/OperationIndex.java