mirror of
https://git.hmsn.ink/kospo/svcm/oa.git
synced 2026-03-20 21:03:35 +09:00
fix : 코드 정리 및 가격조사 기능 추가 완료
This commit is contained in:
@@ -233,7 +233,16 @@ export async function putSurveyPrcsNo(params = {}) {
|
||||
const result = await axios.put(`/api/prcs/survey${params}`)
|
||||
return result.data
|
||||
} catch (e) {
|
||||
throw new Error(e)
|
||||
const serverError = e.response?.data;
|
||||
|
||||
const message = typeof serverError?.body === 'string'
|
||||
? serverError.body
|
||||
: 'Unknown error occurred';
|
||||
|
||||
const error = new Error(message); // ✅ 반드시 string만 넣기! 아니면 객체가 문자열로 나옴
|
||||
error.code = serverError?.code;
|
||||
error.errTime = serverError?.errTime;
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user