Skip to content

Commit

Permalink
fix: add context to log output on finalize error (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Wilsman committed Dec 11, 2019
1 parent d6c3603 commit f582027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/services/build-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default class BuildService extends PercyClientService {
await this.percyClient.finalizeBuild(this.buildId)
this.logEvent('finalized')
} catch (err) {
logger.error('error finalizing build')
logError(err)
}
}
Expand Down
1 change: 1 addition & 0 deletions test/acceptance/exec.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ describe('percy exec', () => {
let [stdout, stderr] = await run('percy exec -- echo test')

expect(stdout).toHaveEntry('[percy] created build #4: <<build-url>>')
expect(stderr).toHaveEntry('[percy] error finalizing build')
expect(stderr).toHaveEntry('[percy] StatusCodeError 404 - {"success":false}')
expect(stdout).not.toHaveEntry('[percy] finalized build #4: <<build-url>>')
})
Expand Down

0 comments on commit f582027

Please sign in to comment.