fix(prodendpoint): if we have a real error just report it dont actually crash
This commit is contained in:
@@ -76,7 +76,9 @@ export const prodEndpoint = async <T>(
|
|||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
message: "There was an error processing the endpoint",
|
message: "There was an error processing the endpoint",
|
||||||
data: apiError.response.data,
|
data: apiError.response
|
||||||
|
? apiError.response.data
|
||||||
|
: [{ error: "There was an internal error." }],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user