Skip to content

Commit f763bb7

Browse files
DominicKramerAce Nassri
authored andcommitted
chore: fix the samples tests (#39)
BREAKING CHANGE: This change renames the `Errors` class to `ErrorReporting`.
1 parent 2fbaff8 commit f763bb7

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

error-reporting/quickstart.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@
1919
function quickstart() {
2020
// [START error_reporting_quickstart]
2121
// Imports the Google Cloud client library
22-
const ErrorReporting = require('@google-cloud/error-reporting');
22+
const ErrorReporting = require('@google-cloud/error-reporting')
23+
.ErrorReporting;
24+
25+
// On Node 6+ the following syntax can be used instead:
26+
// const {ErrorReporting} = require('@google-cloud/error-reporting');
2327

2428
// Instantiates a client
2529
const errors = ErrorReporting();

error-reporting/snippets.js

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
function setupImplicit() {
1919
// [START error_reporting_setup_implicit]
2020
// Imports the Google Cloud client library
21-
const ErrorReporting = require('@google-cloud/error-reporting');
21+
const ErrorReporting = require('@google-cloud/error-reporting')
22+
.ErrorReporting;
23+
24+
// On Node 6+ the following syntax can be used instead:
25+
// const {ErrorReporting} = require('@google-cloud/error-reporting');
2226

2327
// Instantiates a client
2428
const errors = ErrorReporting();
@@ -31,7 +35,11 @@ function setupImplicit() {
3135
function setupExplicit() {
3236
// [START error_reporting_setup_explicit]
3337
// Imports the Google Cloud client library
34-
const ErrorReporting = require('@google-cloud/error-reporting');
38+
const ErrorReporting = require('@google-cloud/error-reporting')
39+
.ErrorReporting;
40+
41+
// On Node 6+ the following syntax can be used instead:
42+
// const {ErrorReporting} = require('@google-cloud/error-reporting');
3543

3644
// Instantiates a client
3745
const errors = ErrorReporting({
@@ -47,7 +55,11 @@ function setupExplicit() {
4755
function manual() {
4856
// [START error_reporting_manual]
4957
// Imports the Google Cloud client library
50-
const ErrorReporting = require('@google-cloud/error-reporting');
58+
const ErrorReporting = require('@google-cloud/error-reporting')
59+
.ErrorReporting;
60+
61+
// On Node 6+ the following syntax can be used instead:
62+
// const {ErrorReporting} = require('@google-cloud/error-reporting');
5163

5264
// Instantiates a client
5365
const errors = ErrorReporting();
@@ -81,7 +93,11 @@ function express() {
8193
const express = require('express');
8294

8395
// Imports the Google Cloud client library
84-
const ErrorReporting = require('@google-cloud/error-reporting');
96+
const ErrorReporting = require('@google-cloud/error-reporting')
97+
.ErrorReporting;
98+
99+
// On Node 6+ the following syntax can be used instead:
100+
// const {ErrorReporting} = require('@google-cloud/error-reporting');
85101

86102
// Instantiates a client
87103
const errors = ErrorReporting();

0 commit comments

Comments
 (0)