Skip to content

Commit e446071

Browse files
committed
Recompile index.js
1 parent d285c01 commit e446071

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

dist/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ module.exports = async function run() {
136136
if (lastStatus == JobStatus.COMPLETED) {
137137
core.info("Analysis finished! Completed with status: " + lastStatus)
138138
} else {
139-
throw new Error("Analysis finished with non-complete status: " + lastStatus)
139+
throw new Error(`Analysis finished with non-complete status: ${lastStatus}. See Code Dx server logs/visual log for more details.`)
140140
}
141141
}
142142
}
@@ -210,7 +210,13 @@ class CodeDxApiClient {
210210
}
211211

212212
async testConnection() {
213-
const response = await this.anonymousHttp.get('/x/system-info').catch(rethrowError)
213+
const response = await this.anonymousHttp.get('/x/system-info').catch(e => {
214+
if (axios.isAxiosError(e) && e.response) {
215+
throw new Error(`Expected OK response, got ${e.response.status}. Is this a Code Dx instance?`)
216+
} else {
217+
throw e
218+
}
219+
})
214220

215221
if (typeof response.data != 'object') {
216222
throw new Error(`Expected JSON Object response, got ${typeof response.data}. Is this a Code Dx instance?`)

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)