catch
This commit is contained in:
@@ -7,6 +7,7 @@ import { useNoticeDetailMutation } from '../../api/use-notice-detail-mutation';
|
||||
import moment from 'moment';
|
||||
import { DetailMotionDuration, DetailMotionStyle, DetailMotionVariants } from '@/entities/common/model/constant';
|
||||
import { FullMenuClose } from '@/entities/common/ui/full-menu-close';
|
||||
import { showAlert } from '@/widgets/show-alert';
|
||||
|
||||
export interface NoticeDetaillProps {
|
||||
detailOn: boolean;
|
||||
@@ -29,6 +30,11 @@ export const NoticeDetail = ({
|
||||
};
|
||||
noticeDetail(detailParams).then((rs: NoticeDetailResponse) => {
|
||||
setResult(rs);
|
||||
}).catch((e: any) => {
|
||||
if(e.response?.data?.error?.message){
|
||||
showAlert(e.response?.data?.error?.message);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user