mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-03-18 23:34:34 +01:00
Added a proper error message for a missing library
This commit is contained in:
@@ -318,10 +318,10 @@ class Statistics @Inject()(
|
||||
val (lastRefreshTime, resultsFuture) = projectReportsProvider.resultsForVersions(versions)
|
||||
resultsFuture flatMap { allResults =>
|
||||
select(allResults, selectorOption).fold(Future.successful(notFound())) { selection =>
|
||||
Future.successful(Ok(views.html.library(
|
||||
dep = selection.result.groupedDependenciesByHashes(depId),
|
||||
selectorOption = selectorOption
|
||||
)))
|
||||
Future.successful(selection.result.groupedDependenciesByHashes.get(depId) match {
|
||||
case None => NotFound(views.html.libraryNotFound(depId = depId, selectorOption = selectorOption))
|
||||
case Some(dep) => Ok(views.html.library(dep = dep, selectorOption = selectorOption))
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user