shwstppr opened a new pull request, #12336:
URL: https://github.com/apache/cloudstack/pull/12336

   ### Description
   
   Framework level improvements for for contextual and localized API error 
messages
   
   Design spec: [Error Message Consistency, Customization, and Localization 
Framework](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Error+Message+Consistency%2C+Customization%2C+and+Localization+Framework)
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### Screenshots (if appropriate):
   Refined error message with additional context for admin
   <img width="901" height="559" alt="image" 
src="https://github.com/user-attachments/assets/6da34831-1683-4c91-a771-a7a300e4c9d3";
 />
   
   User facing error, with localization
   <img width="901" height="559" alt="image" 
src="https://github.com/user-attachments/assets/e8288e07-ea2a-4aca-ba18-bb51621d2d08";
 />
   
   ### Example API response
   
   ```
   {
       "deployvirtualmachineresponse": {
           "uuidList": [],
           "errorcode": 535,
           "cserrorcode": 9999,
           "errortext": "Unable to deploy Instance because allocating 1 more 
Instance would exceed the Account limits. Current: 2, Reserved: 0, Limit: 2. 
Release unused resources, then retry.",
           "errortextkey": "vm.deploy.resourcelimit.exceeded.account",
           "errormetadata": {
               "resourceRequested": "1",
               "resourceTypeDisplay": "Instance",
               "resourceOwnerType": "Account",
               "resourceAmount": "2",
               "resourceReserved": "0",
               "resourceLimit": "2"
           }
       }
   }
   ```
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to