GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — autoProfiling: false and stop doesn't return a promise · Issue #6 · stackimpact/stackimpact-nodejs

autoProfiling: false and stop doesn't return a promise #6

New issue
Copy link
New issue
Copy link
Open
Open
autoProfiling: false and stop doesn't return a promise#6
Copy link

Description

@petermorlion
petermorlion
opened on Jan 8, 2019
Issue body actions

In the agent.js file, I see this piece of code:

if (!self.getOption('autoProfiling')) {
    return self._report(reporter, () => {
        self.isProfiling = false;

        callback();
    });
} 
else {
    self.isProfiling = false;

    if (callback) {
      callback();
    } 
    else {
        return Promise.resolve();
    }
}

Shouldn't the first block in the if-statement also be able to return a promise? I encountered this issue because I had set the autoProfiling to false, but am working with async/await. I get an error at the end of my Lambda that the callback is not a function. This is to be expected, as I didn't provide one.

I can supply a PR, but wanted to check if this was a deliberate decision.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.