add oauth errors to audit logs

This commit is contained in:
Michael 2017-04-30 17:55:21 -04:00
parent acfdbc8592
commit a8cda15372

View file

@ -86,8 +86,11 @@ public async Task<ActionResult> Login(string appname, string appdesc, string ver
return new HttpStatusCodeResult(403);
}
}
catch
catch(Exception ex)
{
var db = new ApplicationDbContext();
db.AuditLogs.Add(new Models.AuditLog("system", AuditLogLevel.Admin, "<b>The following error occurred during an OAuth2 authentication.</b><br/>" + ex.ToString()));
db.SaveChanges();
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}