1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-16 16:40:06 +00:00

refactor(error): refactoring errors and fixing spelling

This commit is contained in:
Yury Shkoda
2020-09-15 12:48:33 +03:00
parent 9af45799b9
commit 81be11f3b9
4 changed files with 96 additions and 98 deletions

View File

@@ -18,7 +18,8 @@ export class FileUploader {
private retryCount = 0
public uploadFile(sasJob: string, files: UploadFile[], params: any) {
if (files?.length < 1) throw new Error('Atleast one file must be provided')
if (files?.length < 1)
throw new Error('At least one file must be provided.')
let paramsString = ''
@@ -75,7 +76,7 @@ export class FileUploader {
})
.then((responseText) => {
if (isLogInRequired(responseText))
reject('You must be logged in to upload a fle')
reject('You must be logged in to upload a file') // FIXME: use ErrorResponse
if (needsRetry(responseText)) {
if (this.retryCount < requestRetryLimit) {