aboutsummaryrefslogtreecommitdiff
path: root/node_modules/passport-facebook/lib/errors/facebooktokenerror.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-27 01:45:42 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-27 01:45:42 +0000
commit3b002a6fb136b9e7e534ffbcfedabed72fcd373d (patch)
treed24c3cb1f9e0283de25c32259f692745c6b19bc1 /node_modules/passport-facebook/lib/errors/facebooktokenerror.js
parent25706820837bd05cdc3b186eb1d5ebabf9688a61 (diff)
Added passport-facbeook
Diffstat (limited to 'node_modules/passport-facebook/lib/errors/facebooktokenerror.js')
-rw-r--r--node_modules/passport-facebook/lib/errors/facebooktokenerror.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/node_modules/passport-facebook/lib/errors/facebooktokenerror.js b/node_modules/passport-facebook/lib/errors/facebooktokenerror.js
new file mode 100644
index 0000000..ff4e9dc
--- /dev/null
+++ b/node_modules/passport-facebook/lib/errors/facebooktokenerror.js
@@ -0,0 +1,36 @@
+/**
+ * `FacebookTokenError` error.
+ *
+ * FacebookTokenError represents an error received from a Facebook's token
+ * endpoint. Note that these responses don't conform to the OAuth 2.0
+ * specification.
+ *
+ * References:
+ * - https://developers.facebook.com/docs/reference/api/errors/
+ *
+ * @constructor
+ * @param {string} [message]
+ * @param {string} [type]
+ * @param {number} [code]
+ * @param {number} [subcode]
+ * @param {string} [traceID]
+ * @access public
+ */
+function FacebookTokenError(message, type, code, subcode, traceID) {
+ Error.call(this);
+ Error.captureStackTrace(this, arguments.callee);
+ this.name = 'FacebookTokenError';
+ this.message = message;
+ this.type = type;
+ this.code = code;
+ this.subcode = subcode;
+ this.traceID = traceID;
+ this.status = 500;
+}
+
+// Inherit from `Error`.
+FacebookTokenError.prototype.__proto__ = Error.prototype;
+
+
+// Expose constructor.
+module.exports = FacebookTokenError;