File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed
Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,12 @@ class Connection {
111111 result [ 0 ] . error ||
112112 ( expectedKey != null && result [ 0 ] [ expectedKey ] == null )
113113 ) {
114- const innerError = result [ 0 ] ?. error || result ;
114+ const innerObject = result [ 0 ] ?. error || result ;
115115 throw new PryvError (
116116 `Error for api method: "${ method } " with params: ${ JSON . stringify (
117117 params
118- ) } >> Result: ${ JSON . stringify ( innerError ) } "`,
119- innerError
118+ ) } >> Result: ${ JSON . stringify ( innerObject ) } "`,
119+ innerObject
120120 ) ;
121121 }
122122 if ( expectedKey != null ) return result [ 0 ] [ expectedKey ] ;
Original file line number Diff line number Diff line change @@ -67,9 +67,9 @@ declare global {
6767 * Custom error class for Pryv library errors
6868 */
6969 class PryvError extends Error {
70- constructor ( message : string , innerError ?: Error | object ) ;
70+ constructor ( message : string , innerObject ?: Error | object ) ;
7171 name : 'PryvError' ;
72- innerError ?: Error | object ;
72+ innerObject ?: Error | object ;
7373 }
7474}
7575
Original file line number Diff line number Diff line change @@ -166,12 +166,12 @@ declare module 'pryv' {
166166
167167 /**
168168 * Custom error class for Pryv library errors.
169- * Includes an innerError property for wrapping underlying errors.
169+ * Includes an innerObject property for wrapping underlying errors.
170170 */
171171 export class PryvError extends globalThis . Error {
172- constructor ( message : string , innerError ?: globalThis . Error | object ) ;
172+ constructor ( message : string , innerObject ?: globalThis . Error | object ) ;
173173 name : 'PryvError' ;
174- innerError ?: globalThis . Error | object ;
174+ innerObject ?: globalThis . Error | object ;
175175 }
176176
177177 export type StreamsQuery = {
Original file line number Diff line number Diff line change 99 * @property {pryv.Connection } Connection - To interact with an individual's (user) data set
1010 * @property {pryv.Browser } Browser - Browser Tools - Access request helpers and visuals (button)
1111 * @property {pryv.utils } utils - Exposes some utils for HTTP calls and tools to manipulate Pryv's API endpoints
12- * @property {pryv.PryvError } PryvError - Custom error class with innerError support
12+ * @property {pryv.PryvError } PryvError - Custom error class with innerObject support
1313 */
1414module . exports = {
1515 Service : require ( './Service' ) ,
Original file line number Diff line number Diff line change 55
66/**
77 * Custom error class for Pryv library errors.
8- * Includes an innerError property for wrapping underlying errors.
8+ * Includes an innerObject property for wrapping underlying errors.
99 * @extends Error
1010 */
1111class PryvError extends Error {
1212 /**
1313 * Create a PryvError
1414 * @param {string } message - Error message
15- * @param {Error|Object } [innerError ] - The underlying error or object that caused this error
15+ * @param {Error|Object } [innerObject ] - The underlying error or object that caused this error
1616 */
17- constructor ( message , innerError ) {
17+ constructor ( message , innerObject ) {
1818 super ( message ) ;
1919 this . name = 'PryvError' ;
2020 /** @type {Error|Object|undefined } */
21- this . innerError = innerError ;
21+ this . innerObject = innerObject ;
2222
2323 // Maintains proper stack trace for where error was thrown (only in V8)
2424 if ( Error . captureStackTrace ) {
You can’t perform that action at this time.
0 commit comments