Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove functions_concepts_error_object #1484

Merged
merged 17 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .kokoro/functions/concepts.cfg

This file was deleted.

23 changes: 0 additions & 23 deletions functions/concepts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,6 @@

'use strict';

/**
* HTTP Cloud Function that demonstrates
* how to catch errors of different types.
*
* @param {Object} req Cloud Function request context.
* @param {Object} req.body Cloud Function request context body.
* @param {String} req.body.topic The Cloud Pub/Sub topic to publish to.
* @param {Object} res Cloud Function response context.
*/
exports.errorTypes = (req, res) => {
// [START functions_concepts_error_object]
try {
// Throw an Error object (to simulate a GCP API failure)
throw new Error('Error object!');
} catch (err) {
// err is already an Error object
console.error(err);
}
// [END functions_concepts_error_object]

res.end();
};

// [START functions_concepts_stateless]
// Global variable, but only shared within function instance.
let count = 0;
Expand Down
37 changes: 0 additions & 37 deletions functions/concepts/test/index.test.js

This file was deleted.