mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-24 05:18:58 +00:00
(loader) Fix it so that the loader doesn't explode if it sees an invalid URL
This commit is contained in:
parent
99523ca079
commit
2a92de29ce
@ -83,9 +83,15 @@ public class DocumentLoaderService {
|
|||||||
projection.ordinal()
|
projection.ordinal()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var parsedUrl = EdgeUrl.parse(projection.url());
|
||||||
|
if (parsedUrl.isEmpty()) {
|
||||||
|
logger.error("Failed to parse URL: {}", projection.url());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
documentDbWriter.add(new DocdbUrlDetail(
|
documentDbWriter.add(new DocdbUrlDetail(
|
||||||
urlId,
|
urlId,
|
||||||
new EdgeUrl(projection.url()),
|
parsedUrl.get(),
|
||||||
projection.title(),
|
projection.title(),
|
||||||
projection.description(),
|
projection.description(),
|
||||||
projection.quality(),
|
projection.quality(),
|
||||||
|
Loading…
Reference in New Issue
Block a user