Skip to content

Commit

Permalink
Revert "TheHive-Project#39 Customize error message for security excep…
Browse files Browse the repository at this point in the history
…tion"

This reverts commit d02dfce.
  • Loading branch information
To-om committed Dec 18, 2017
1 parent 9f4d314 commit 9bacbc8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/org/elastic4play/ErrorHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version := "1.4.2-SNAPSHOT"
version := "1.4.1"

0 comments on commit 9bacbc8

Please sign in to comment.