251113_02_FIX : ESLINT 오류 해결
This commit is contained in:
15
.idea/git_toolbox_prj.xml
generated
Normal file
15
.idea/git_toolbox_prj.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GitToolBoxProjectSettings">
|
||||
<option name="commitMessageIssueKeyValidationOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
<option name="commitMessageValidationEnabledOverride">
|
||||
<BoolValueOverride>
|
||||
<option name="enabled" value="true" />
|
||||
</BoolValueOverride>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
1
.idea/inspectionProfiles/Project_Default.xml
generated
1
.idea/inspectionProfiles/Project_Default.xml
generated
@@ -1,6 +1,7 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="CssUnresolvedCustomProperty" enabled="false" level="ERROR" enabled_by_default="false" />
|
||||
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
</profile>
|
||||
</component>
|
||||
@@ -191,10 +191,24 @@ export const createHttpClient = (baseURL: string, opts: HttpClientOptions = {})
|
||||
}
|
||||
|
||||
return parsed as T;
|
||||
} catch (err: any) {
|
||||
// 🔻 여기서 네트워크 레벨 에러 처리
|
||||
const code = err?.cause?.code ?? err?.code;
|
||||
} catch (err: unknown) {
|
||||
let code: string | undefined;
|
||||
if (typeof err === "object" && err !== null) {
|
||||
const anyErr = err as { cause?: unknown; code?: unknown };
|
||||
|
||||
if (anyErr.cause && typeof anyErr.cause === "object") {
|
||||
const cause = anyErr.cause as { code?: unknown };
|
||||
if (typeof cause.code === "string") {
|
||||
code = cause.code;
|
||||
}
|
||||
}
|
||||
|
||||
if (!code && typeof anyErr.code === "string") {
|
||||
code = anyErr.code;
|
||||
}
|
||||
}
|
||||
|
||||
// 🔻 여기서 네트워크 레벨 에러 처리
|
||||
if (code === "ECONNREFUSED") {
|
||||
// 네트워크 연결 실패 → HttpError(404)로 변환
|
||||
throw new HttpError(
|
||||
|
||||
Reference in New Issue
Block a user