This commit is contained in:
2020-09-09 21:34:08 +00:00
parent 4c90616668
commit 46a2ceb05b
3 changed files with 20 additions and 7 deletions

View File

@@ -236,9 +236,9 @@ namespace AyaNova.Api.Controllers
//Don't send the full stack trace, just the initial error message from the javascript eval
// "Evaluation failed: ReferenceError: reportdata is not defined\n at ayPrepareData (<anonymous>:5:17)\n at ayPreRender (C:\\data\\code\\raven\\server\\AyaNova\\resource\\rpt\\ay-report.js:13:12)\n at __puppeteer_evaluation_script__:10:25"
var v = ex.Message;
int positionOfNewLine = v.IndexOf("\n at");
if (positionOfNewLine >= 0)
v = v.Substring(0, positionOfNewLine);
// int positionOfNewLine = v.IndexOf("\n at");
// if (positionOfNewLine >= 0)
// v = v.Substring(0, positionOfNewLine);
return BadRequest(new ApiErrorResponse(ApiErrorCode.INVALID_OPERATION, null, v));
}