Aws-lambda-dotnet: stackTrace strings aren't being escaped on exception

Created on 28 Feb 2018  路  2Comments  路  Source: aws/aws-lambda-dotnet

If the stack trace includes JSON escape characters (such as "\" characters as part of a Windows path included in a debug build), such characters aren't being escaped ("\") and thus invalid JSON is being produced.

Here is an example error:

{
  "errorType": "Exception",
  "errorMessage": "Incorrect StudentID, LoginCode, or PassCode",
  "stackTrace": [
    "at MyNS.MyMethod() in C:\Projects\SomePath\Session.cs:line 95",
    "at lambda_method(Closure , Stream , Stream , LambdaContextInternal )"
  ]
}

Reproduction:

  1. Build a C# lambda function under debug in Windows.
  2. Have said function throw an exception
bug

All 2 comments

We're working on a fix for this and will get it released as soon as possible.

The fix for this issue has been deployed to production.

Was this page helpful?
0 / 5 - 0 ratings