Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Problem in sending error report using Stacktrace.report #133

Copy link
Copy link
@sarker306

Description

@sarker306
Issue body actions

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?

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.