fleet/frontend/pages/SoftwarePage/SoftwareAddPage/SoftwareCustomPackage/helpers.ts
Sarah Gillespie 3727474043
Update add software UI to move software package modal into new tabbed layout (#22553)
Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com>
2024-10-02 10:43:20 -05:00

13 lines
380 B
TypeScript

import { getErrorReason } from "interfaces/errors";
const UPLOAD_ERROR_MESSAGES = {
default: {
message: "Couldn't add. Please try again.",
},
};
// eslint-disable-next-line import/prefer-default-export
export const getErrorMessage = (err: unknown) => {
if (typeof err === "string") return err;
return getErrorReason(err) || UPLOAD_ERROR_MESSAGES.default.message;
};