You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently PostComment function returns exception messages to user. This can leak some unnecessary internal workings of the function to the user. This should be only used locally for debugging and otherwise rely on logging. So:
Returning error message and exceptions should be replaced with logging.
Issue: #8
Replaces exception handling by either returning a result (Ok, Redirect or BadRequest) or logging the possible exception.
Refactor to simplify the PostComment function.
Change Azure Function's return type to Task<IActionResult> to make testing possible.
Replace NameValueCollection with IFormCollection for easier testing.
Issue: #8
No need for NRE, because the current parameterinfo (constructor parameter) doesn't represent a return value. See ParameterInfo.Name property documentation for more.
Currently
PostComment
function returns exception messages to user. This can leak some unnecessary internal workings of the function to the user. This should be only used locally for debugging and otherwise rely on logging. So:Returning error message and exceptions should be replaced with logging.
See this for reference:
Write logs in C# functions
The text was updated successfully, but these errors were encountered: