TASK22102: slice2 migrate remaining email handlers
This commit is contained in:
@@ -6,6 +6,7 @@ import { consoleLogger } from "../../../actions/core/logger";
|
||||
import { getToken } from "../../../actions/core/token";
|
||||
import { formatDates } from "../../../components/utils";
|
||||
import { hashAPIPath } from "../../../actions/core/hash";
|
||||
import { respondError, respondSuccess } from "../middleware/apiResponse";
|
||||
|
||||
var NotifyClient = require("notifications-node-client").NotifyClient;
|
||||
|
||||
@@ -439,11 +440,13 @@ export default async function CombinedApiProxy(req, res) {
|
||||
sendingResults.push(result);
|
||||
}
|
||||
|
||||
res.status(200).json({ sendingResults });
|
||||
return respondSuccess(res, { sendingResults });
|
||||
} catch (error) {
|
||||
consoleLogger(error);
|
||||
res.status(500).json({
|
||||
error: "An error occurred while retrieving combined data.",
|
||||
return respondError(res, {
|
||||
status: 500,
|
||||
code: "EMAIL_COMBINED_FETCH_FAILED",
|
||||
message: "An error occurred while retrieving combined data.",
|
||||
details: error.message || error.toString()
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user