- Notifications
You must be signed in to change notification settings - Fork 279
Closed
Description
I am using express 4.0 and I'm trying to send client side error from my angular app to server. I have exposed StackTrace as an angular service stacktraceService.
If I catch the error manually, and send them via a POST request like this:
stacktraceService.StackTrace .fromError(exception) .then(function(stackframes){console.log(stackframes); $.ajax({type: "POST", url: "./error", contentType: "application/json", data: angular.toJson({stack: stackframes }) })}); The server side code can parse the req.body using "json()" method of express/body-parser and show it correctly.
However, if I use the stacktrace.js report functionality, like,
stacktraceService.StackTrace .fromError(exception) .then(function(stackframes){console.log(stackframes); stacktraceService.StackTrace .report(stackframes, './error')}); ,then the server side code finds the req.body undefined.
I was wondering what the cause would be. Am I using .report() functionality wrong?
Metadata
Metadata
Assignees
Labels
No labels