Basic widget data validation

This commit is contained in:
Michael Shamoon 2022-10-22 22:48:25 -07:00
parent 5b7d2eaf07
commit 7b7740563e
6 changed files with 88 additions and 2 deletions

View file

@ -98,6 +98,6 @@ export async function httpProxy(url, params = {}) {
catch (err) {
logger.error("Error calling %s//%s%s...", url.protocol, url.hostname, url.pathname);
logger.error(err);
return [500, "application/json", { error: "Unexpected error" }, null];
return [500, "application/json", { error: {message: err?.message ?? "Unknown error", url, rawError: err} }, null];
}
}