Knotx / knotx

Knot.x is a highly-efficient and scalable integration framework designed to build backend APIs
https://knotx.io
Apache License 2.0
126 stars 26 forks source link

Improve error catching when service has missing configuration #199

Closed zajcu closed 7 years ago

zajcu commented 7 years ago

When service has missing configuration following error occurs during fragment processing:

java.util.NoSuchElementException: No value present at java.util.Optional.get(Optional.java:135) ~[na:1.8.0_91] at com.cognifide.knotx.knot.view.service.ServiceEngine.mergeWithConfiguration(ServiceEngine.java:72) ~[knotx-example-monolith-0.6.0-SNAPSHOT-fat.jar:na] at rx.internal.operators.OnSubscribeMap$MapSubscriber.onNext(OnSubscribeMap.java:69) ~[knotx-example-monolith-0.6.0-SNAPSHOT-fat.jar:na] at rx.observers.Subscribers$5.onNext(Subscribers.java:235) ~[knotx-example-monolith-0.6.0-SNAPSHOT-fat.jar:na]

Knot.x should send 500, with proper error in log.

marcinczeczko commented 7 years ago

Fixed