Closed mmalhado closed 4 years ago
It seems we can improve the line 2330 of Uploader.java
:
uploadErrorEventCallback(file, UploadErrorEvent.ErrorCode.HTTP_ERROR.toInt(),
"Unsuccessful server response code of: " + responseReceived);
by including serverData
as the error message instead.
Could you please try that and see if it works? Any pull requests are welcome and appreciated.
I'm implementing a service that processes a CSV file and in case an error occurs during processing/validation a description in returned through the body of the HTTP response.
Currently, I don't think there is way to access this description on the client side so it can be presented to the user.
It seems to me it would make sense for the org.wisepersist.gwt.uploader.client.events.UploadErrorEvent#getMessage method (or an alternative to it) to return this data,