import { SeamMalformedInputError } from 'seamapi';
export const getValidationError = (params) => {
    const { error, property } = params;
    if (!(error instanceof SeamMalformedInputError)) {
        return undefined;
    }
    const propertyErrors = (error.validationErrors[property] ?? {
        _errors: [],
    });
    return propertyErrors._errors[0];
};
//# sourceMappingURL=error-handlers.js.map