Skip to content

Commit

Permalink
[#5461] Improvement(web): Refine error message in WebUI (#5464)
Browse files Browse the repository at this point in the history
### 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?
N/A

Fix: #5461

### Does this PR introduce _any_ user-facing change?
N/A
### How was this patch tested?
manually
  • Loading branch information
LauraXia123 authored Nov 5, 2024
1 parent 81e617a commit 9f60d37
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions web/web/src/lib/utils/axios/checkStatus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 9f60d37

Please sign in to comment.