You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/03/22 06:04:07 UTC

[GitHub] rhtyd commented on a change in pull request #2498: CLOUDSTACK-10327: Do not invalidate the session when API command not found

rhtyd commented on a change in pull request #2498: CLOUDSTACK-10327: Do not invalidate the session when API command not found
URL: https://github.com/apache/cloudstack/pull/2498#discussion_r176315829
 
 

 ##########
 File path: server/src/com/cloud/api/ApiServer.java
 ##########
 @@ -958,6 +959,9 @@ private boolean commandAvailable(final InetAddress remoteAddress, final String c
         } catch (final RequestLimitException ex) {
             s_logger.debug(ex.getMessage());
             throw new ServerApiException(ApiErrorCode.API_LIMIT_EXCEED, ex.getMessage());
+        }  catch (final UnavailableCommandException ex) {
+            s_logger.debug(ex.getMessage());
+            throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, ex.getMessage());
 
 Review comment:
   Why not throw ServerApiException with suitable http error code so as to not cause log out in the UI. Simply handle permission denied exception here? (or the line below)

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


With regards,
Apache Git Services