Small details and logs

This commit is contained in:
Iván Ovejero
2021-01-15 08:58:51 -03:00
parent 9290993400
commit 6e4b6f677e
2 changed files with 5 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
};
options.uri = `${credentials.webDavUrl}/${encodeURI(endpoint)}`;
console.log(options);
return await this.helpers.request(options);
} else {
const credentials = this.getCredentials('nextCloudOAuth2Api');
@@ -58,6 +58,7 @@ export async function nextCloudApiRequest(this: IHookFunctions | IExecuteFunctio
return await this.helpers.requestOAuth2!.call(this, 'nextCloudOAuth2Api', options);
}
} catch (error) {
console.log(error);
throw new Error(`NextCloud Error. Status Code: ${error.statusCode}. Message: ${error.message}`);
}
}