rabbah commented on a change in pull request #3199: One tid for the whole 
system.
URL: 
https://github.com/apache/incubator-openwhisk/pull/3199#discussion_r178430820
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/http/ErrorResponse.scala
 ##########
 @@ -248,13 +247,27 @@ object ErrorResponse extends Directives with 
DefaultJsonProtocol {
   }
 
   implicit val serializer = new RootJsonFormat[ErrorResponse] {
-    def write(er: ErrorResponse) = JsObject("error" -> er.error.toJson, "code" 
-> er.code.meta.id.toJson)
+    def write(er: ErrorResponse) = {
+      val tidMeta = er.code.meta
+      // Convert the tid to a number. If this is not possible, use 
`unknown`-tid
 
 Review comment:
   should this serialization of the tid be moved to the transaction id 
singleton?
   also i'd note that the system id should never leak out in the response 
(there aren't any instances where it will as i remember).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to