This is an automated email from the ASF dual-hosted git repository.

jshao pushed a commit to branch branch-0.7
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/branch-0.7 by this push:
     new ce223d3a5 [#5461] Improvement(web): Refine error message in WebUI 
(#5468)
ce223d3a5 is described below

commit ce223d3a5d9865f4d02d829ec819cff056d02266
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 5 18:57:44 2024 +0800

    [#5461] Improvement(web): Refine error message in WebUI (#5468)
    
    ### What changes were proposed in this pull request?
    Refine error message in WebUI
    <img width="1199" alt="Pasted Graphic"
    
src="https://github.com/user-attachments/assets/6539d8b3-b755-4949-ae96-5ec40dc7849a";>
    
    
    ### Why are the changes needed?
    Fix: #5461
    
    ### Does this PR introduce _any_ user-facing change?
    N/A
    ### How was this patch tested?
    manually
    
    Co-authored-by: Qian Xia <[email protected]>
---
 web/web/src/lib/utils/axios/checkStatus.js | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/web/web/src/lib/utils/axios/checkStatus.js 
b/web/web/src/lib/utils/axios/checkStatus.js
index ea215adf5..50d821eb0 100644
--- a/web/web/src/lib/utils/axios/checkStatus.js
+++ b/web/web/src/lib/utils/axios/checkStatus.js
@@ -51,19 +51,19 @@ export function checkStatus(status, msg, errorMessageMode = 
'message') {
       break
 
     case 403:
-      errMessage = 'The user is authorized, but access is forbidden!'
+      errMessage = msg || 'The user is authorized, but access is forbidden!'
       break
 
     case 404:
-      errMessage = 'Network request error, the resource was not found!'
+      errMessage = msg || 'Network request error, the resource was not found!'
       break
 
     case 405:
-      errMessage = 'Network request error, request method not allowed!'
+      errMessage = msg || 'Network request error, request method not allowed!'
       break
 
     case 408:
-      errMessage = 'Network request timed out!'
+      errMessage = msg || 'Network request timed out!'
       break
 
     case 409:
@@ -75,23 +75,23 @@ export function checkStatus(status, msg, errorMessageMode = 
'message') {
       break
 
     case 501:
-      errMessage = 'The network is not implemented!'
+      errMessage = msg || 'The network is not implemented!'
       break
 
     case 502:
-      errMessage = 'Network Error!'
+      errMessage = msg || 'Network Error!'
       break
 
     case 503:
-      errMessage = 'The service is unavailable, the server is temporarily 
overloaded or maintained!'
+      errMessage = msg || 'The service is unavailable, the server is 
temporarily overloaded or maintained!'
       break
 
     case 504:
-      errMessage = 'Network timeout!'
+      errMessage = msg || 'Network timeout!'
       break
 
     case 505:
-      errMessage = 'The http version does not support the request!'
+      errMessage = msg || 'The http version does not support the request!'
       break
 
     default:

Reply via email to