File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
13
13
;
14
14
15
- let promise = functions.createTag('[ FUNCTION_ID] ', '[ COMMAND] ', fs.createReadStream(__ dirname + '/file.png'))) ;
15
+ let promise = functions.createTag('[ FUNCTION_ID] ', '[ COMMAND] ', fs.createReadStream(__ dirname + '/file.png'));
16
16
17
17
promise.then(function (response) {
18
18
console.log(response);
Original file line number Diff line number Diff line change 12
12
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
13
13
;
14
14
15
- let promise = storage.createFile(fs.createReadStream(__ dirname + '/file.png'))) ;
15
+ let promise = storage.createFile(fs.createReadStream(__ dirname + '/file.png'));
16
16
17
17
promise.then(function (response) {
18
18
console.log(response);
Original file line number Diff line number Diff line change @@ -152,10 +152,10 @@ class Client {
152
152
let response = await axios ( options ) ;
153
153
return response . data ;
154
154
} catch ( error ) {
155
- if ( 'response' in error ) {
155
+ if ( 'response' in error && error . response !== undefined ) {
156
156
if ( error . response && 'data' in error . response ) {
157
157
if ( typeof ( error . response . data ) === 'string' ) {
158
- throw new AppwriteException ( error . response . data , error . response . status , error . response . data ) ;
158
+ throw new AppwriteException ( error . response . data , error . response . status , error . response . data ) ;
159
159
} else {
160
160
throw new AppwriteException ( error . response . data . message , error . response . status , error . response . data ) ;
161
161
}
You can’t perform that action at this time.
0 commit comments