NullPointerException when getRepositoryDetails after a cancelled scan

Description

I cancelled a scan, then subsequently calls to `getRepositoryDetails` produce this stack trace



The situation is that a Scan object is created in the db for the latest commit, but there is no corresponding RefScan because RefScan is not updated for failed scans.

Proposed solution:

  • Update the branch status (RefScan) even if the scan failed.

  • Add some defensive checks against null pointer

Environment

None

Assignee

George V @Mohami

Reporter

George V @Mohami

Sprint

None

Labels

None

Github URL

None

Priority

Medium
Configure