Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on $delete event if id does not exist #279

Open
rschuil opened this issue Oct 21, 2020 · 1 comment
Open

Exception on $delete event if id does not exist #279

rschuil opened this issue Oct 21, 2020 · 1 comment

Comments

@rschuil
Copy link

rschuil commented Oct 21, 2020

When sending a $delete event with an entity ID that does not exist, Harness returns status 500 and logs an exception:

09:28:02.279 INFO ActorSystemImpl - Harness Server: HttpRequest(HttpMethod(POST),http://host:9090/engines/ur/events,List(Host: host:9090, User-Agent: agent, Timeout-Access: ),HttpEntity.Strict(application/json,{"event":"$delete","entityType":"item","entityId":"766559","eventTime":"2020-10-21T10:28:02+03:00"}),HttpProtocol(HTTP/1.1))
09:28:02.281 ERROR MongoAsyncDao - Can't removeOne from collection ur.items with filter WrappedArray((_id,Equals(766559)))
09:28:02.282 ERROR ActorSystemImpl - Internal error
java.lang.RuntimeException: Can't removeOne from collection ur.items with filter WrappedArray((_id,Equals(766559)))
at com.actionml.core.store.backends.MongoAsyncDao$$anonfun$removeOneAsync$2.apply(MongoAsyncDao.scala:133)
at com.actionml.core.store.backends.MongoAsyncDao$$anonfun$removeOneAsync$2.apply(MongoAsyncDao.scala:127)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:253)
at scala.concurrent.Future$$anonfun$flatMap$1.apply(Future.scala:251)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:36)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Request : HttpRequest(HttpMethod(POST),http://host:9090/engines/ur/events,List(Host: host:9090, User-Agent: agent, Timeout-Access: ),HttpEntity.Strict(application/json,{"event":"$delete","entityType":"item","entityId":"766559","eventTime":"2020-10-21T10:28:02+03:00"}),HttpProtocol(HTTP/1.1))
Response: Complete(HttpResponse(500 Internal Server Error,List(),HttpEntity.Strict(text/plain; charset=UTF-8,There was an internal server error.),HttpProtocol(HTTP/1.1)))
09:28:02.282 INFO ActorSystemImpl - Complete: HttpMethod(POST):http://host:9090/engines/ur/events -> 500 Internal Server Error [3 ms.]

@frutik
Copy link

frutik commented Oct 21, 2020

🙀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants