Farmbot-Web-App/frontend/toast_errors.ts

8 lines
229 B
TypeScript
Raw Normal View History

import { UnsafeError } from "./interfaces";
import { error } from "farmbot-toastr";
import { prettyPrintApiErrors } from "./util";
export function toastErrors({ err }: UnsafeError) {
return error(prettyPrintApiErrors(err));
}