From 9bacbc8e83bff7be5cc7d71999601c5524707b0f Mon Sep 17 00:00:00 2001 From: To-om Date: Mon, 18 Dec 2017 17:31:43 +0100 Subject: [PATCH] Revert "#39 Customize error message for security exception" This reverts commit d02dfce0005435fa100bea41f8067975c8d5460f. --- app/org/elastic4play/ErrorHandler.scala | 2 -- version.sbt | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/org/elastic4play/ErrorHandler.scala b/app/org/elastic4play/ErrorHandler.scala index d3a41e8..6fe7719 100644 --- a/app/org/elastic4play/ErrorHandler.scala +++ b/app/org/elastic4play/ErrorHandler.scala @@ -10,7 +10,6 @@ import play.api.mvc.{ RequestHeader, ResponseHeader, Result, Results } import org.elasticsearch.client.transport.NoNodeAvailableException import org.elasticsearch.index.IndexNotFoundException import org.elasticsearch.index.query.QueryShardException -import org.elasticsearch.ElasticsearchSecurityException import org.elastic4play.JsonFormat.attributeCheckingExceptionWrites @@ -37,7 +36,6 @@ class ErrorHandler extends HttpErrorHandler { case SearchError(message, cause) ⇒ Some(Status.BAD_REQUEST → Json.obj("type" → "SearchError", "message" → s"$message (${cause.getMessage})")) case ace: AttributeCheckingError ⇒ Some(Status.BAD_REQUEST → Json.toJson(ace)) case iae: IllegalArgumentException ⇒ Some(Status.BAD_REQUEST → Json.obj("type" → "IllegalArgument", "message" → iae.getMessage)) - case _: ElasticsearchSecurityException ⇒ Some(Status.INTERNAL_SERVER_ERROR → Json.obj("type" → "NoNodeAvailable", "message" → "ElasticSearch cluster access denied, check your authentication settings")) case _: NoNodeAvailableException ⇒ Some(Status.INTERNAL_SERVER_ERROR → Json.obj("type" → "NoNodeAvailable", "message" → "ElasticSearch cluster is unreachable")) case CreateError(_, message, attributes) ⇒ Some(Status.INTERNAL_SERVER_ERROR → Json.obj("type" → "CreateError", "message" → message, "object" → attributes)) case ErrorWithObject(tpe, message, obj) ⇒ Some(Status.BAD_REQUEST → Json.obj("type" → tpe, "message" → message, "object" → obj)) diff --git a/version.sbt b/version.sbt index 275e341..dbce5aa 100644 --- a/version.sbt +++ b/version.sbt @@ -1 +1 @@ -version := "1.4.2-SNAPSHOT" +version := "1.4.1"