TASK22102: slice4 larger file set + production detail suppression
This commit is contained in:
@@ -11,6 +11,7 @@ export const respondError = (
|
||||
details
|
||||
} = {}
|
||||
) => {
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
const payload = {
|
||||
success: false,
|
||||
error: {
|
||||
@@ -19,7 +20,7 @@ export const respondError = (
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof details !== "undefined") {
|
||||
if (!isProduction && typeof details !== "undefined") {
|
||||
payload.error.details = details;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user