Showing
4 changed files
with
18 additions
and
17 deletions
| ... | @@ -108,9 +108,8 @@ const BottleInfoContainer = (props : BottleInfoProps) => { | ... | @@ -108,9 +108,8 @@ const BottleInfoContainer = (props : BottleInfoProps) => { |
| 108 | Alert.onError('접근 권한이 없습니다.', () => props.history.push('/')); | 108 | Alert.onError('접근 권한이 없습니다.', () => props.history.push('/')); |
| 109 | } | 109 | } |
| 110 | } catch(e : any) { | 110 | } catch(e : any) { |
| 111 | - Alert.onError(e.response.data.error, () => props.history.push('/')); | ||
| 112 | - | ||
| 113 | console.log(e); | 111 | console.log(e); |
| 112 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => props.history.push('/')); | ||
| 114 | } | 113 | } |
| 115 | }; | 114 | }; |
| 116 | 115 | ||
| ... | @@ -134,7 +133,7 @@ const BottleInfoContainer = (props : BottleInfoProps) => { | ... | @@ -134,7 +133,7 @@ const BottleInfoContainer = (props : BottleInfoProps) => { |
| 134 | Alert.onError('피드백 등록에 실패했습니다.', () => null); | 133 | Alert.onError('피드백 등록에 실패했습니다.', () => null); |
| 135 | } | 134 | } |
| 136 | } catch(e : any) { | 135 | } catch(e : any) { |
| 137 | - Alert.onError(e.response.data.error, () => fetchData()); | 136 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => fetchData()); |
| 138 | } | 137 | } |
| 139 | } else { | 138 | } else { |
| 140 | Alert.onError('피드백 내용을 입력하세요.', () => null); | 139 | Alert.onError('피드백 내용을 입력하세요.', () => null); | ... | ... |
| ... | @@ -66,7 +66,7 @@ const LoginContainer = (props : LoginProps) => { | ... | @@ -66,7 +66,7 @@ const LoginContainer = (props : LoginProps) => { |
| 66 | Alert.onError('권한이 없는 유저입니다.', () => props.history.push('/')); | 66 | Alert.onError('권한이 없는 유저입니다.', () => props.history.push('/')); |
| 67 | } | 67 | } |
| 68 | } catch(e : any) { | 68 | } catch(e : any) { |
| 69 | - Alert.onError(e.response.data.error, () => null); | 69 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | }; | 72 | }; | ... | ... |
| ... | @@ -84,7 +84,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -84,7 +84,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 84 | }).catch(error => console.log(error)); | 84 | }).catch(error => console.log(error)); |
| 85 | } | 85 | } |
| 86 | setLoading(false); | 86 | setLoading(false); |
| 87 | - } catch(e) { | 87 | + } catch(e : any) { |
| 88 | console.log(e); | 88 | console.log(e); |
| 89 | setLoading(false); | 89 | setLoading(false); |
| 90 | } | 90 | } |
| ... | @@ -152,7 +152,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -152,7 +152,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 152 | } | 152 | } |
| 153 | 153 | ||
| 154 | } catch(e : any) { | 154 | } catch(e : any) { |
| 155 | - Alert.onError(e.response.data.error, () => null); | 155 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 156 | } | 156 | } |
| 157 | }; | 157 | }; |
| 158 | 158 | ||
| ... | @@ -183,7 +183,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -183,7 +183,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 183 | }); | 183 | }); |
| 184 | } catch(e : any) { | 184 | } catch(e : any) { |
| 185 | setLoading(false); | 185 | setLoading(false); |
| 186 | - Alert.onError(e.response.data.error, () => null); | 186 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 187 | } | 187 | } |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| ... | @@ -201,7 +201,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -201,7 +201,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 201 | Alert.onError('환자에게 담당의 등록 요청을 실패했습니다.', () => null); | 201 | Alert.onError('환자에게 담당의 등록 요청을 실패했습니다.', () => null); |
| 202 | } | 202 | } |
| 203 | } catch(e : any) { | 203 | } catch(e : any) { |
| 204 | - Alert.onError(e.response.data.error, () => null); | 204 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 205 | } | 205 | } |
| 206 | }; | 206 | }; |
| 207 | 207 | ||
| ... | @@ -245,7 +245,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -245,7 +245,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 245 | } | 245 | } |
| 246 | setLoading(false); | 246 | setLoading(false); |
| 247 | } catch(e : any) { | 247 | } catch(e : any) { |
| 248 | - Alert.onError(e.response.data.error, () => null); | 248 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 249 | } | 249 | } |
| 250 | }; | 250 | }; |
| 251 | 251 | ||
| ... | @@ -284,7 +284,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { | ... | @@ -284,7 +284,7 @@ const DoctorMenuContainer = (props : DoctorMenuProps) => { |
| 284 | } | 284 | } |
| 285 | } catch(e : any) { | 285 | } catch(e : any) { |
| 286 | setLoading(false); | 286 | setLoading(false); |
| 287 | - Alert.onError(e.response.data.error, () => null); | 287 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 288 | } | 288 | } |
| 289 | }; | 289 | }; |
| 290 | 290 | ... | ... |
| ... | @@ -40,7 +40,8 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -40,7 +40,8 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 40 | Alert.onError(res.data.error, () => null); | 40 | Alert.onError(res.data.error, () => null); |
| 41 | } | 41 | } |
| 42 | } catch(e : any) { | 42 | } catch(e : any) { |
| 43 | - Alert.onError(e.response.data.error, () => null); | 43 | + console.log(e); |
| 44 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); | ||
| 44 | } | 45 | } |
| 45 | }; | 46 | }; |
| 46 | 47 | ||
| ... | @@ -67,7 +68,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -67,7 +68,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 67 | } | 68 | } |
| 68 | }) | 69 | }) |
| 69 | } catch(e : any) { | 70 | } catch(e : any) { |
| 70 | - Alert.onError(e.response.data.error, () => setModalUp(false)); | 71 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => setModalUp(false)); |
| 71 | } | 72 | } |
| 72 | }; | 73 | }; |
| 73 | 74 | ||
| ... | @@ -102,7 +103,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -102,7 +103,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 102 | } | 103 | } |
| 103 | }); | 104 | }); |
| 104 | } catch(e : any) { | 105 | } catch(e : any) { |
| 105 | - Alert.onError(e.response.data.error, () => setModalUp(false)); | 106 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => setModalUp(false)); |
| 106 | } | 107 | } |
| 107 | }; | 108 | }; |
| 108 | 109 | ||
| ... | @@ -121,7 +122,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -121,7 +122,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 121 | } | 122 | } |
| 122 | }); | 123 | }); |
| 123 | } catch(e : any) { | 124 | } catch(e : any) { |
| 124 | - Alert.onError(e.response.data.error, () => setModalUp(false)); | 125 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => setModalUp(false)); |
| 125 | } | 126 | } |
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| ... | @@ -138,13 +139,14 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -138,13 +139,14 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 138 | setValidate(res.data.result ? 'Y' : 'N'); | 139 | setValidate(res.data.result ? 'Y' : 'N'); |
| 139 | } | 140 | } |
| 140 | }).catch(err => { | 141 | }).catch(err => { |
| 141 | - Alert.onError(err.response.data.error, () => { | 142 | + console.log(err); |
| 143 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => { | ||
| 142 | setModalUp(false); | 144 | setModalUp(false); |
| 143 | setValidate('W'); | 145 | setValidate('W'); |
| 144 | }); | 146 | }); |
| 145 | }) | 147 | }) |
| 146 | } catch(e : any) { | 148 | } catch(e : any) { |
| 147 | - Alert.onError(e.response.data, () => { | 149 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => { |
| 148 | setModalUp(false); | 150 | setModalUp(false); |
| 149 | setValidate('W'); | 151 | setValidate('W'); |
| 150 | }); | 152 | }); |
| ... | @@ -161,7 +163,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { | ... | @@ -161,7 +163,7 @@ const ManagerMenuContainer = (props : ManagerMenuProps) => { |
| 161 | Alert.onSuccess('탈퇴를 승인했습니다.', fetchData); | 163 | Alert.onSuccess('탈퇴를 승인했습니다.', fetchData); |
| 162 | } | 164 | } |
| 163 | } catch (e : any) { | 165 | } catch (e : any) { |
| 164 | - Alert.onError(e.response.data.error, () => null); | 166 | + Alert.onError('알 수 없는 에러가 발생했습니다.', () => null); |
| 165 | } | 167 | } |
| 166 | }; | 168 | }; |
| 167 | 169 | ... | ... |
-
Please register or login to post a comment