import { createReducer } from "typesafe-actions";
export const errorReducer = createReducer(null)
    .handleAction("ERROR_SET", (_, { payload: { name = "Error", message, code } }) => ({
    name,
    message,
    code
}))
    .handleAction("ERROR_CLEAR", () => null);
