This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 9215436 Errors logging fixes.
9215436 is described below
commit 9215436e9be509ac00e5a6cd0e40d52b1798bf5f
Author: Sergey Kamov <[email protected]>
AuthorDate: Wed Oct 21 16:21:13 2020 +0300
Errors logging fixes.
---
.../apache/nlpcraft/server/rest/NCBasicRestApi.scala | 18 ------------------
1 file changed, 18 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
index c0c64e7..bc42891 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/server/rest/NCBasicRestApi.scala
@@ -531,16 +531,6 @@ class NCBasicRestApi extends NCRestApi with LazyLogging
with NCOpenCensusTrace w
/**
*
- * @param e
- */
- private def onError(e: Throwable): Unit = {
- U.prettyError(logger,s"Unexpected system error.", e)
-
- completeError(StatusCodes.InternalServerError, "NC_ERROR",
e.getLocalizedMessage)
- }
-
- /**
- *
* @return
*/
private def ask0(process: AskReqHolder ⇒ Route): Route = {
@@ -647,10 +637,6 @@ class NCBasicRestApi extends NCRestApi with LazyLogging
with NCOpenCensusTrace w
h.parent
)
- fut.failed.collect {
- case e ⇒ onError(e)
- }
-
successWithJs(
fut.collect {
// We have to use GSON (not spray) here to serialize
'resBody' field.
@@ -783,10 +769,6 @@ class NCBasicRestApi extends NCRestApi with LazyLogging
with NCOpenCensusTrace w
val fut = NCSuggestSynonymManager.suggest(req.mdlId,
req.minScore, span)
- fut.failed.collect {
- case e ⇒ onError(e)
- }
-
successWithJs(
fut.collect {
// We have to use GSON (not spray) here to serialize
'result' field.