- 
                Notifications
    
You must be signed in to change notification settings  - Fork 32
 
🎨 Handles wallet forbidden error and enhances handling of unexpected errors #6444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🎨 Handles wallet forbidden error and enhances handling of unexpected errors #6444
Conversation
2f4e1ae    to
    c8ccba9      
    Compare
  
    
          Codecov ReportAttention: Patch coverage is  
 
 Additional details and impacted files@@            Coverage Diff            @@
##           master   #6444      +/-   ##
=========================================
+ Coverage    84.5%   87.8%    +3.2%     
=========================================
  Files          10    1197    +1187     
  Lines         214   52429   +52215     
  Branches       25     947     +922     
=========================================
+ Hits          181   46049   +45868     
- Misses         23    6202    +6179     
- Partials       10     178     +168     
 Flags with carried forward coverage won't be shown. Click here to find out more. 
  | 
    
ad83f22    to
    96f5f92      
    Compare
  
            
          
                services/static-webserver/client/source/class/osparc/FlashMessenger.js
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                services/static-webserver/client/source/class/osparc/data/Resources.js
              
                Outdated
          
            Show resolved
            Hide resolved
        
      96f5f92    to
    cf43ba0      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Please take into consideration my suggestion
        
          
                packages/service-library/src/servicelib/aiohttp/rest_middlewares.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                packages/service-library/tests/aiohttp/test_rest_middlewares.py
              
                Outdated
          
            Show resolved
            Hide resolved
        
      
          
 | 
    



What do these changes do?
This PR is focused on enhancing error handling in the web API for unexpected errors and also specifically the managing wallet access errors during project patching.
Key changes in the PR:
Improved Wallet Access Error Handling:
500response (Internal Server Error).500error, the system will now handle and notify the user about the wallet access issue, providing better clarity on the failure point.servicelib.aiohttp.rest_middlewareUpdates:servicelib.aiohttp.rest_middlewarehas been updated to handle unhandled exceptions more gracefully.500 Internal Server Errorresponse, but logs the error using the functiontroubleshooting_log_message. This helps ensure that error details are logged effectively with associated error codes for easier diagnosis during troubleshooting.Front-End Handling of500Error Messages- The front-end is now equipped to properly handle500responses from the API. This means that when such errors occur, the front-end will display appropriate messages to the user, improving the overall user experience during failure scenarios.@odeimaiz For the moment I revert the front-end changes. We could follow up on that in place
Implications and Benefits:
troubleshooting_log_messageensures that issues are logged more systematically, aiding in debugging and troubleshooting without leaving gaps.500errors, the user experience is less likely to be disrupted by vague or unclear error messages.These improvements are a step forward in ensuring a more reliable and user-friendly API service, even in scenarios involving unexpected errors.
Related issue/s
How to test
Dev-ops checklist
None