The api returns 2 status code depending on file size. For 200,it returns a json string which I have converted to Object using transformImportCSVResponse(). For 201, it returns a text as response ("File upload is in progress")
Right now it's failing for 201 as it's not able to convert to json
How to process both based on status code.
this.httpClient.post(url, uploadedFile, {params: httpParams}).pipe(
catchError(err => throwError(err)))
.pipe(map(this.transformImportCSVResponse))