Fix #218: upload task error

Fix #218: change callback onFailure method to add an errorType and an errorMessage