Skip to content

Commit

Permalink
chore: fix the samples tests (#39)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This change renames the `Errors` class to `ErrorReporting`.
  • Loading branch information
DominicKramer authored and Ace Nassri committed Nov 11, 2022
1 parent 507c61e commit eed6b18
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
6 changes: 5 additions & 1 deletion error-reporting/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
function quickstart() {
// [START error_reporting_quickstart]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');
const ErrorReporting = require('@google-cloud/error-reporting')
.ErrorReporting;

// On Node 6+ the following syntax can be used instead:
// const {ErrorReporting} = require('@google-cloud/error-reporting');

// Instantiates a client
const errors = ErrorReporting();
Expand Down
24 changes: 20 additions & 4 deletions error-reporting/snippets.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
function setupImplicit() {
// [START error_reporting_setup_implicit]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');
const ErrorReporting = require('@google-cloud/error-reporting')
.ErrorReporting;

// On Node 6+ the following syntax can be used instead:
// const {ErrorReporting} = require('@google-cloud/error-reporting');

// Instantiates a client
const errors = ErrorReporting();
Expand All @@ -31,7 +35,11 @@ function setupImplicit() {
function setupExplicit() {
// [START error_reporting_setup_explicit]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');
const ErrorReporting = require('@google-cloud/error-reporting')
.ErrorReporting;

// On Node 6+ the following syntax can be used instead:
// const {ErrorReporting} = require('@google-cloud/error-reporting');

// Instantiates a client
const errors = ErrorReporting({
Expand All @@ -47,7 +55,11 @@ function setupExplicit() {
function manual() {
// [START error_reporting_manual]
// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');
const ErrorReporting = require('@google-cloud/error-reporting')
.ErrorReporting;

// On Node 6+ the following syntax can be used instead:
// const {ErrorReporting} = require('@google-cloud/error-reporting');

// Instantiates a client
const errors = ErrorReporting();
Expand Down Expand Up @@ -81,7 +93,11 @@ function express() {
const express = require('express');

// Imports the Google Cloud client library
const ErrorReporting = require('@google-cloud/error-reporting');
const ErrorReporting = require('@google-cloud/error-reporting')
.ErrorReporting;

// On Node 6+ the following syntax can be used instead:
// const {ErrorReporting} = require('@google-cloud/error-reporting');

// Instantiates a client
const errors = ErrorReporting();
Expand Down

0 comments on commit eed6b18

Please sign in to comment.