Skip to content

Commit

Permalink
fix: add message httpStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
richardmichel committed Jun 26, 2023
1 parent 7e957b4 commit af46a42
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/UploadFile/UploadFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export class UploadFile extends Evented {
...this.getDetail(),
progress: 0,
fileStatus: ERROR_STATUS,
httpStatus: event?.response?.status
httpStatus: event?.response?.status,
message: event?.response?.data?.errors || 'Existió un error al cargar el archivo, intente nuevamente.',
};
this.fire('status');
}
Expand Down
6 changes: 1 addition & 5 deletions src/components/useFileUploadS3Multipart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,7 @@ const useFileUploadS3Multipart = ({
errorCallback({
uuid: null,
fileName: file.name,
message: detail?.errors
? detail?.errors
: detail?.message
? detail?.message
: 'Existió un error al cargar el archivo, intente nuevamente.',
message: detail?.message || '',
httpStatus: detail?.httpStatus || 500,
});
}
Expand Down

0 comments on commit af46a42

Please sign in to comment.