mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
fix there is no error on missing revision
This commit is contained in:
@@ -15,6 +15,9 @@ import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Response;
|
||||
import java.io.IOException;
|
||||
|
||||
import static sonia.scm.ContextEntry.ContextBuilder.entity;
|
||||
import static sonia.scm.NotFoundException.notFound;
|
||||
|
||||
public class SourceRootResource {
|
||||
|
||||
private final RepositoryServiceFactory serviceFactory;
|
||||
@@ -62,7 +65,7 @@ public class SourceRootResource {
|
||||
if (browserResult != null) {
|
||||
return Response.ok(browserResultToFileObjectDtoMapper.map(browserResult, namespaceAndName)).build();
|
||||
} else {
|
||||
return Response.status(Response.Status.NOT_FOUND).build();
|
||||
throw notFound(entity("sources", path).in(namespaceAndName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user