cập nhật modal CRUD thuyền viên trong trip
This commit is contained in:
@@ -24,7 +24,7 @@ const codeMessage = {
|
||||
|
||||
// Tạo instance axios với cấu hình cơ bản
|
||||
const api: AxiosInstance = axios.create({
|
||||
baseURL: "https://sgw.gms.vn",
|
||||
baseURL: "https://sgw.gms.vn",
|
||||
timeout: 20000, // Timeout 20 giây
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
@@ -72,8 +72,9 @@ api.interceptors.response.use(
|
||||
statusText ||
|
||||
"Unknown error";
|
||||
|
||||
// Không hiển thị toast cho status 400 (validation errors)
|
||||
if (status !== 400) {
|
||||
// Không hiển thị toast cho status 400 (validation errors) và 404 (not found)
|
||||
// 404 được xử lý riêng bởi component (ví dụ: search crew không tìm thấy)
|
||||
if (status !== 400 && status !== 404) {
|
||||
showErrorToast(`Lỗi ${status}: ${errMsg}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user