Skip to content

Commit 13ba419

Browse files
committed
feat: improve installation error messages
Provide the user with a more meaningful error message, when a package cannot be uploaded or the installation failed.
1 parent b4ff274 commit 13ba419

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

index.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,16 @@ function install (client, options) {
309309

310310
client.app.upload(file.contents, xarName)
311311
.then(response => {
312-
if (!response.success) { return callback(new PluginError('gulp-exist', 'XAR was not uploaded')) }
312+
if (!response.success) {
313+
return callback(new PluginError('gulp-exist', `XAR was not uploaded: ${response.error}`))
314+
}
313315
log(`Install ${xarName}`)
314316
return client.app.install(xarName, customPackageRepoUrl)
315317
})
316318
.then(response => {
317-
if (!response.success) { return callback(new PluginError('gulp-exist', 'XAR Installation failed')) }
319+
if (!response.success) {
320+
return callback(new PluginError('gulp-exist', `XAR Installation failed: ${response.error}`))
321+
}
318322
if (response.result.update) {
319323
log('Application was updated')
320324
return callback(null, response)

0 commit comments

Comments
 (0)