Skip to content

Various API end points return no information at all about the error when an exception is thrown #459

@simon-20

Description

@simon-20

Brief Description
In pub-get-stats-all/index.js, when an exception is thrown, the app returns a server 500 and attempts to convert the exception to a JSON object to send back to the client.

But this conversion process is broken, meaning that the client never receives any details about the error, just a 500 status with no further information.

The problem is that calling JSON.stringify(err) on an exception object err returns {}. The call needs to be JSON.stringify(err, Object.getOwnPropertyNames(err)).

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