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 — error-reporting: Fix bug with errors not published by DominicKramer · Pull Request #2314 · googleapis/google-cloud-node

Conversation

@DominicKramer

@DominicKramer DominicKramer commented May 17, 2017

Copy link
Copy Markdown
Contributor

This commit fixes a bug where if
errors.event().setMessage(string) was used to build an error to
report, the error wouldn't appear in the error reporting console.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
DominicKramer added 2 commits May 17, 2017 00:29
@DominicKramer
error-reporting: Fix bug with errors not published
f8853fa
This commit fixes a bug where if
`errors.event().setMessage(string)` was used to build an error to
report, the error wouldn't appear in the error reporting console.
@DominicKramer
Fix unit tests and improve system tests
5f04257
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 17, 2017
@DominicKramer DominicKramer added the api: error-reporting label May 17, 2017
@coveralls

coveralls commented May 17, 2017

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 5f04257 on DominicKramer:bug/manually-built-errors-not-displayed into ** on GoogleCloudPlatform:master**.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DominicKramer
DominicKramer requested a review from matthewloring May 17, 2017 15:32
matthewloring
matthewloring suggested changes May 17, 2017
View reviewed changes
Comment thread packages/error-reporting/src/interfaces/manual.js Outdated
}

if (err instanceof ErrorMessage) {
var fauxError = new Error(err.message);

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/error-reporting/src/interfaces/manual.js Outdated
if (err instanceof ErrorMessage) {
var fauxError = new Error(err.message);
var fullStack = fauxError.stack.split('\n');
var cleanedStack = fullStack.slice(0, 1).concat(fullStack.slice(2)).join('\n');

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DominicKramer
Add code comments
82c115e
@coveralls

coveralls commented May 17, 2017

Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 82c115e on DominicKramer:bug/manually-built-errors-not-displayed into ** on GoogleCloudPlatform:master**.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DominicKramer
Custom errors now use definition site stack trace
a06ce26
Previously the stack trace at the point `errors.report` was
called was used.
@DominicKramer

DominicKramer commented May 19, 2017

Copy link
Copy Markdown
Contributor Author

@matthewloring This is ready for another look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

matthewloring
matthewloring approved these changes May 19, 2017
View reviewed changes

@matthewloring matthewloring left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a few nits and clarifying questions (and assuming CI failures are unrelated).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/error-reporting/src/interfaces/message-builder.js Outdated
function newMessage() {
return new ErrorMessage().setServiceContext(
// The API expects a reported error to contain a stack trace.
// However, users do not need to provide a stack trace for stack

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/error-reporting/src/interfaces/manual.js Outdated
// will not accept the ErrorMessage if it has additional properties.
delete err._autoGeneratedStackTrace;
}
else {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/error-reporting/src/interfaces/manual.js
// The API expects the error to contain a stack trace. Thus we
// append the stack trace of the point where the error was constructed.
// See the `message-builder.js` file for more details.
if (err._autoGeneratedStackTrace) {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DominicKramer
Address GitHub comments
f60eefc
* Updated docs
* Fixed some code comments
* Fixed some code formatting
matthewloring
matthewloring approved these changes May 22, 2017
View reviewed changes

@matthewloring matthewloring left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nit

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread packages/error-reporting/README.md Outdated

The stack trace associated with an error can be viewed in the error reporting console.
* If the `errors.report` method is given an `ErrorMessage` object built using the `errors.event` method, the stack trace at the point where the error event was constructed will be used.
* If the `errors.report` method is given an `Error` object, the stack trace where the error originated will be used.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DominicKramer
Fix the wording of stack trace usage
3250f76
@DominicKramer

DominicKramer commented May 22, 2017

Copy link
Copy Markdown
Contributor Author

@stephenplusplus This is ready to land since the broken tests appear to be unrelated to the error-reporting library.

Here is the end of the test failure:


module.js:327
    throw err;
    ^

Error: Cannot find module '/home/ubuntu/google-cloud-node/packages/video-intelligence/package.json'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at new Module (/home/ubuntu/google-cloud-node/scripts/helpers.js:63:17)
    at Module (/home/ubuntu/google-cloud-node/scripts/helpers.js:57:12)
    at Array.map (native)
    at Function.Module.getUpdated (/home/ubuntu/google-cloud-node/scripts/helpers.js:142:24)
    at Object.<anonymous> (/home/ubuntu/google-cloud-node/scripts/build.js:50:22)
    at Module._compile (module.js:409:26)

. scripts/circle/test.sh returned exit code 1
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus merged commit 4b4c22b into googleapis:master May 22, 2017
@stephenplusplus

stephenplusplus commented May 22, 2017

Copy link
Copy Markdown
Contributor

Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Jul 5, 2017
Update dependency @google-cloud/datastore to version 1.0.7 Platane/velib-paris#24
Merged
Update dependency @google-cloud/storage to version 1.2.0 Platane/velib-paris#25
Merged
GautamSharda pushed a commit that referenced this pull request Jan 14, 2026
@DominicKramer @stephenplusplus
error-reporting: Fix bug with errors not published (#2314)
02700a3
GautamSharda pushed a commit that referenced this pull request Jan 15, 2026
@DominicKramer @stephenplusplus
error-reporting: Fix bug with errors not published (#2314)
159404d
@GautamSharda GautamSharda mentioned this pull request Jan 20, 2026
chore: migrate code from googleapis/nodejs-error-reporting #7019
Closed
4 tasks
GautamSharda pushed a commit that referenced this pull request Feb 5, 2026
@DominicKramer @stephenplusplus
error-reporting: Fix bug with errors not published (#2314)
8ea36d4
@GautamSharda GautamSharda mentioned this pull request Feb 5, 2026
migrate code from googleapis/nodejs-error-reporting #7169
Closed
4 tasks
GautamSharda pushed a commit that referenced this pull request Feb 23, 2026
@DominicKramer @stephenplusplus
error-reporting: Fix bug with errors not published (#2314)
7b2e5cc
This was referenced Feb 23, 2026
migrate code from googleapis/nodejs-error-reporting #7294
Closed
migrate code from googleapis/nodejs-error-reporting #7308
Merged
sofisl pushed a commit that referenced this pull request Feb 26, 2026
@alkatrivedi @gcf-owl-bot
chore: add sample for statement timeout within a transaction (#2314)
350ddac
* chore: add sample for statement timeout within a transaction

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix-presubmit

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@matthewloring matthewloring matthewloring approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: error-reporting cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@DominicKramer @coveralls @stephenplusplus @matthewloring @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — 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.