markusthoemmes commented on a change in pull request #4164: Add warn log when 
too many requests happened
URL: 
https://github.com/apache/incubator-openwhisk/pull/4164#discussion_r240504779
 
 

 ##########
 File path: 
core/controller/src/main/scala/org/apache/openwhisk/core/controller/AuthorizedRouteDispatcher.scala
 ##########
 @@ -86,7 +89,11 @@ trait BasicAuthorizedRouteProvider extends Directives {
               case NotFound =>
                 handleEntitlementFailure(
                   RejectRequest(NotFound, 
Some(ErrorResponse(Messages.resourceDoesntExist(resource.fqname), transid))))
-              case _ => handleEntitlementFailure(t)
+              case code =>
+                if (code == TooManyRequests) {
+                  logger.warn(this, s"${resource.id} invoked failed: ${t}")
+                }
 
 Review comment:
   Since  we don't have a logger at hand here:
   
   1. Should we pass a logger into the `authorizeAndDispatch` method?
   2. Can we log outside of the method by inspecting it's return value?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to