Skip to content

report: AdditionalMessage param is never used #517

@splacentino

Description

@splacentino

Environment details

  • OS: Mac OS
  • Node.js version: 12.14.1
  • npm version: 6.13.4
  • @google-cloud/error-reporting version: 2.0.0

Steps to reproduce

  1. Create a reporter:
const reporter = new ErrorReporting({ reportMode: "always" });
  1. Report with additionalMessage
reporter.report(new Error("Something is wrong"), undefined, { extraInfo: "this", otherInfo: "that", ...});
  1. Check report google cloud "error reporting"

Nothing about additionalMessage is displayed

Inner code check

    function reportManualError(err, request, additionalMessage, callback) {
		...
        if (is.string(additionalMessage)) {
            em.setMessage(additionalMessage);
        }

Object type is never handled, however type definition is as this:

report: (err: any, request?: manualRequestExtractor.Request, additionalMessage?: string | {}, callback?: manualInterface.Callback | {} | string) => ErrorMessage;

Metadata

Metadata

Assignees

Labels

api: clouderrorreportingIssues related to the googleapis/nodejs-error-reporting API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions