Compare commits
No commits in common. "6f5513a5e10c84d68e8292aa2a616cf68b350f76" and "d30d92df0b80f0376895730d0a70a17ffc007767" have entirely different histories.
6f5513a5e1
...
d30d92df0b
@ -1,16 +1,6 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
export default function ServerError() {
|
export default function ServerError() {
|
||||||
// Log 500 error details to console
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
console.error('🚨 500 Server Error Page Rendered:', {
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
userAgent: navigator.userAgent,
|
|
||||||
url: window.location.href,
|
|
||||||
referrer: document.referrer
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="bg-white dark:bg-gray-900">
|
<section className="bg-white dark:bg-gray-900">
|
||||||
<div className="py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6">
|
<div className="py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6">
|
||||||
@ -18,9 +8,6 @@ export default function ServerError() {
|
|||||||
<h1 className="mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-primary-600 dark:text-primary-500">500</h1>
|
<h1 className="mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-primary-600 dark:text-primary-500">500</h1>
|
||||||
<p className="mb-4 text-3xl tracking-tight font-bold text-gray-900 md:text-4xl dark:text-white">Internal Server Error.</p>
|
<p className="mb-4 text-3xl tracking-tight font-bold text-gray-900 md:text-4xl dark:text-white">Internal Server Error.</p>
|
||||||
<p className="mb-4 text-lg font-light text-gray-500 dark:text-gray-400">We are already working to solve the problem. </p>
|
<p className="mb-4 text-lg font-light text-gray-500 dark:text-gray-400">We are already working to solve the problem. </p>
|
||||||
<p className="text-sm text-gray-400 dark:text-gray-500">
|
|
||||||
Check the browser console for detailed error information.
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import GlobalDataProvider from './GlobalDataProvider'
|
|||||||
import Header from '@/components/header/Header'
|
import Header from '@/components/header/Header'
|
||||||
import QModal from '@/components/common/modal/QModal'
|
import QModal from '@/components/common/modal/QModal'
|
||||||
import PopupManager from '@/components/common/popupManager/PopupManager'
|
import PopupManager from '@/components/common/popupManager/PopupManager'
|
||||||
import ErrorBoundary from '@/components/common/ErrorBoundary'
|
|
||||||
|
|
||||||
import './globals.css'
|
import './globals.css'
|
||||||
import '../styles/style.scss'
|
import '../styles/style.scss'
|
||||||
@ -70,7 +69,6 @@ export default async function RootLayout({ children }) {
|
|||||||
return (
|
return (
|
||||||
<RecoilRootWrapper>
|
<RecoilRootWrapper>
|
||||||
<GlobalDataProvider>
|
<GlobalDataProvider>
|
||||||
<ErrorBoundary>
|
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body>
|
<body>
|
||||||
{headerPathname === '/login' || headerPathname === '/join' ? (
|
{headerPathname === '/login' || headerPathname === '/join' ? (
|
||||||
@ -91,7 +89,6 @@ export default async function RootLayout({ children }) {
|
|||||||
)}
|
)}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</ErrorBoundary>
|
|
||||||
</GlobalDataProvider>
|
</GlobalDataProvider>
|
||||||
</RecoilRootWrapper>
|
</RecoilRootWrapper>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -55,8 +55,6 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const apiUrl = `${url}?${params.toString()}`
|
const apiUrl = `${url}?${params.toString()}`
|
||||||
|
|
||||||
try {
|
|
||||||
const resultData = await get({ url: apiUrl })
|
const resultData = await get({ url: apiUrl })
|
||||||
|
|
||||||
if (resultData) {
|
if (resultData) {
|
||||||
@ -64,18 +62,6 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) {
|
|||||||
setFileList(resultData.data)
|
setFileList(resultData.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
console.error('🚨 ARCHIVE fetching error:', {
|
|
||||||
error,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
apiUrl,
|
|
||||||
params: Object.fromEntries(params),
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
message: error.message,
|
|
||||||
stack: error.stack
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//공지사항 호출
|
//공지사항 호출
|
||||||
@ -96,16 +82,7 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('🚨 NOTICE fetching error:', {
|
console.error('NOTICE fetching error:', error)
|
||||||
error,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
apiUrl: noticeApiUrl,
|
|
||||||
params: param,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
message: error.message,
|
|
||||||
stack: error.stack
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,16 +106,7 @@ export default function MainContents({ setFaqOpen, setFaqModalNoticeNo }) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('🚨 FAQ fetching error:', {
|
console.error('FAQ fetching error:', error)
|
||||||
error,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
apiUrl: faqApiUrl,
|
|
||||||
params: param,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
message: error.message,
|
|
||||||
stack: error.stack
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -53,20 +53,7 @@ export const useMainContentsController = () => {
|
|||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
setIsGlobalLoading(false)
|
setIsGlobalLoading(false)
|
||||||
console.error('🚨 MAIN API fetching error:', {
|
console.error('MAIN API fetching error:', error)
|
||||||
error,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
apiUrl,
|
|
||||||
session: {
|
|
||||||
storeId: session?.storeId,
|
|
||||||
userId: session?.userId,
|
|
||||||
builderNo: session?.builderNo
|
|
||||||
},
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
message: error.message,
|
|
||||||
stack: error.stack
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,65 +38,13 @@ export function useAxios(lang = '') {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// response 추가 로직
|
// response 추가 로직
|
||||||
axios.interceptors.response.use(
|
axios.interceptors.request.use(undefined, (error) => {})
|
||||||
(response) => {
|
|
||||||
// 500 에러 로깅
|
|
||||||
if (response.status === 500) {
|
|
||||||
console.error('🚨 500 Error Response:', {
|
|
||||||
url: response.config.url,
|
|
||||||
method: response.config.method,
|
|
||||||
status: response.status,
|
|
||||||
statusText: response.statusText,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
requestData: response.config.data,
|
|
||||||
responseData: response.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return response
|
|
||||||
},
|
|
||||||
(error) => {
|
|
||||||
// 500 에러 및 기타 에러 로깅
|
|
||||||
if (error.response?.status === 500) {
|
|
||||||
console.error('🚨 500 Error Caught:', {
|
|
||||||
url: error.config?.url,
|
|
||||||
method: error.config?.method,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
requestData: error.config?.data,
|
|
||||||
errorMessage: error.message,
|
|
||||||
errorStack: error.stack
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.error('🚨 API Error:', {
|
|
||||||
url: error.config?.url,
|
|
||||||
method: error.config?.method,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return Promise.reject(error)
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
const get = async ({ url, option = {} }) => {
|
const get = async ({ url, option = {} }) => {
|
||||||
return await getInstances(url)
|
return await getInstances(url)
|
||||||
.get(url, option)
|
.get(url, option)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch(console.error)
|
||||||
console.error('🚨 GET Error:', {
|
|
||||||
url,
|
|
||||||
method: 'GET',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
config: error.config
|
|
||||||
})
|
|
||||||
throw error
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const promiseGet = async ({ url, option = {} }) => {
|
const promiseGet = async ({ url, option = {} }) => {
|
||||||
@ -107,19 +55,7 @@ export function useAxios(lang = '') {
|
|||||||
return await getInstances(url)
|
return await getInstances(url)
|
||||||
.post(url, data, option)
|
.post(url, data, option)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch(console.error)
|
||||||
console.error('🚨 POST Error:', {
|
|
||||||
url,
|
|
||||||
method: 'POST',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
requestData: data,
|
|
||||||
config: error.config
|
|
||||||
})
|
|
||||||
throw error
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const promisePost = async ({ url, data, option = {} }) => {
|
const promisePost = async ({ url, data, option = {} }) => {
|
||||||
@ -130,19 +66,7 @@ export function useAxios(lang = '') {
|
|||||||
return await getInstances(url)
|
return await getInstances(url)
|
||||||
.put(url, data, option)
|
.put(url, data, option)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch(console.error)
|
||||||
console.error('🚨 PUT Error:', {
|
|
||||||
url,
|
|
||||||
method: 'PUT',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
requestData: data,
|
|
||||||
config: error.config
|
|
||||||
})
|
|
||||||
throw error
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const promisePut = async ({ url, data, option = {} }) => {
|
const promisePut = async ({ url, data, option = {} }) => {
|
||||||
@ -153,19 +77,7 @@ export function useAxios(lang = '') {
|
|||||||
return await getInstances(url)
|
return await getInstances(url)
|
||||||
.patch(url, data, option)
|
.patch(url, data, option)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch(console.error)
|
||||||
console.error('🚨 PATCH Error:', {
|
|
||||||
url,
|
|
||||||
method: 'PATCH',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
requestData: data,
|
|
||||||
config: error.config
|
|
||||||
})
|
|
||||||
throw error
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const promisePatch = async ({ url, data, option = {} }) => {
|
const promisePatch = async ({ url, data, option = {} }) => {
|
||||||
@ -176,18 +88,7 @@ export function useAxios(lang = '') {
|
|||||||
return await getInstances(url)
|
return await getInstances(url)
|
||||||
.delete(url, option)
|
.delete(url, option)
|
||||||
.then((res) => res.data)
|
.then((res) => res.data)
|
||||||
.catch((error) => {
|
.catch(console.error)
|
||||||
console.error('🚨 DELETE Error:', {
|
|
||||||
url,
|
|
||||||
method: 'DELETE',
|
|
||||||
timestamp: new Date().toISOString(),
|
|
||||||
errorMessage: error.message,
|
|
||||||
status: error.response?.status,
|
|
||||||
statusText: error.response?.statusText,
|
|
||||||
config: error.config
|
|
||||||
})
|
|
||||||
throw error
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const promiseDel = async ({ url, option = {} }) => {
|
const promiseDel = async ({ url, option = {} }) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user