Skip to content

Commit

Permalink
Omit query analysis error message (#282)
Browse files Browse the repository at this point in the history
* FCORE-562 Omitted QueryAnalysisError message due to security
* Returning uuid in error message and logging the error with the same
  • Loading branch information
gargrishabh75 committed Dec 17, 2020
1 parent f7592e3 commit 21eb5be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.coursera.naptime.ari.graphql.controllers

import java.util.UUID.randomUUID
import javax.inject._
import com.typesafe.scalalogging.Logger
import com.typesafe.scalalogging.StrictLogging
Expand Down Expand Up @@ -147,7 +148,9 @@ class GraphQLController @Inject()(
}
}.recover {
case error: QueryAnalysisError =>
OutgoingQuery(error.resolveError.as[JsObject], None)
val uuid = randomUUID().toString
logger.error("QueryAnalysisError- " + uuid, error)
OutgoingQuery(Json.obj("error" -> "QueryAnalysisError", "message" -> uuid), None)
case error: ErrorWithResolver =>
OutgoingQuery(error.resolveError.as[JsObject], None)
case error: Exception =>
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "0.11.4"
version in ThisBuild := "0.11.5"

0 comments on commit 21eb5be

Please sign in to comment.