Skip to content

[Bug] API GET /api/alert fails when similarity is specified #1981

Closed
@jtavan

Description

@jtavan

Request Type

Bug

Work Environment

Quesion Answer
OS version (server) Debian 9
Virtualized Env. True
Dedicated RAM 16 GB
vCPU 8
TheHive version / git hash 4.1.4-1
Package Type DEB
Database Cassandra
Index type Lucene
Attachments storage Local

Problem Description

When I use ?similarity=1 in a GET to /api/alert for an alert ID that does exist, I receive {"type":"NotFoundError","message":"Alert not found"}. Making the GET without the parameter returns the alert correctly.

The application log contains the following:

2021-04-16 10:36:33,236 [WARN] from org.thp.scalligraph.utils.Retry in application-akka.actor.default-dispatcher-17 [000005b4|1a2736c3] An error occurs (java.lang.IllegalArgumentException: The provided traverser does not map to a value: v[1437784]->[JanusGraphVertexStep(IN,[ShareObservable],vertex), JanusGraphVertexStep(OUT,[ShareCase],vertex)]), retrying (1)
2021-04-16 10:36:33,237 [WARN] from org.thp.scalligraph.ErrorHandler in application-akka.actor.default-dispatcher-17 [000005b4|] GET /api/alert/~40988728?similarity=1 returned 404
2021-04-16 10:36:33,237 [INFO] from org.thp.scalligraph.AccessLogFilter in application-akka.actor.default-dispatcher-5 [000005b4|] 127.0.0.1 GET /api/alert/~40988728?similarity=1 took 153ms and returned 404 52 bytes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions