Minor improvements to ClickUp-Node

This commit is contained in:
Jan Oberhauser
2020-01-18 20:36:57 -06:00
parent a5d920c5ba
commit 6639ccefc1
5 changed files with 196 additions and 211 deletions

View File

@@ -14,7 +14,7 @@ export async function clickupApiRequest(this: IHookFunctions | IExecuteFunctions
throw new Error('No credentials got returned!');
}
let options: OptionsWithUri = {
const options: OptionsWithUri = {
headers: {
Authorization: credentials.accessToken,
'Content-Type': 'application/json',
@@ -30,8 +30,8 @@ export async function clickupApiRequest(this: IHookFunctions | IExecuteFunctions
} catch (error) {
let errorMessage = error;
if (error.err) {
errorMessage = error.err
errorMessage = error.err;
}
throw new Error('Click Up Error: ' + errorMessage);
throw new Error('ClickUp Error: ' + errorMessage);
}
}