-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth client/#62 #75
Auth client/#62 #75
Conversation
β¦ying error messages
πstorybook: https://65ccb85d5afe55a024495bc0-lehsyckfah.chromatic.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/ui/view/molecule/table/table.stories.tsx
app/ui/view/molecule/list/swipeable-custom-list.tsx
ν΄λΉ νμΌμ PRμμ λ§μν΄μ£Όμ buildν΄κ²°μ μν΄μ λ³κ²½λ μ¬νμΈ κ² κ°λ€μ.
κ°λ° κ³Όμ μ μμΈν μ μ΄μ£Όμ
μ μ΄ν΄κ° μμνλ κ² κ°μμ. κ°μ¬ν©λλ€. μκ³ νμ
¨μ΄μ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global-errorλ νλ‘λμ μμλ§ νμ±νλμ΄ sub-pageμ errorμμ ν΄λΉ μ²λ¦¬λ₯Ό μ§ννλ κ²μΌλ‘ μ΄ν΄νλλ°, ν΄λΉ νμΌμ μ΄λ»κ² μ¬μ©λ μμ μΈκ°μ? μΆν λ³κ²½μ μμνμλμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- νλ‘λμ μμλ global-errorμμ μλ¬λ₯Ό μ²λ¦¬νλ κ²μ΄ μ’κ² λ€λ μκ°μ΄ μμ΅λλ€. λ§μνμ λλ‘ κ°λ° κ³Όμ μμλ sub-pageμμ μλ¬ μ²λ¦¬λ₯Ό μ§ννμ§λ§, λ°°ν¬ μ§μ μ μΈμ¦κ΄λ ¨ μλ¬ μ²λ¦¬λ global-errorμμ μλνλλ‘ μμ ν κ³νμ λλ€.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ν΄λΉ νμ΄μ§λ μΈμ νΈμΆμ΄ λκ³ μ΄λ μν μ νλμ§ μΆκ°λ‘ μ€λͺ μ ν΄μ£Όμ€ μ μμκΉμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ λ κΆκΈν©λλ€ !
μ κ° μμνκΈ°μλ protected νμ΄μ§λ‘ κ°κ²λλ©΄ 무쑰건 401μ λ°ννλκΉ error.tsxκ° νΈμΆνκ³ μ΄ λ‘μ§μ 보기 μν΄μ protected νμ΄μ§λ₯Ό λ§λ κ² κ°μλ° λ§μκΉμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- μ΄ νμ΄μ§λ μΈμ¦ κ΄λ ¨ μλ¬ μ²λ¦¬ λ‘μ§μ΄ μ μμ μΌλ‘ μλνλμ§ ν μ€νΈνκΈ° μν΄ λ§λ κ°λ°μ©μ λλ€. μ£Όμμ κΈ°λ‘ν΄λμ΄μΌ νλλ°, λΉ νΈλ Έλ€μ. λ―Έμν©λλ€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
κ³ μνμ ¨μ΅λλ€
- error.jsμ global-error.jsμ λν΄ λ°°μ°κ³ κ°λλ€!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ λ κΆκΈν©λλ€ !
μ κ° μμνκΈ°μλ protected νμ΄μ§λ‘ κ°κ²λλ©΄ 무쑰건 401μ λ°ννλκΉ error.tsxκ° νΈμΆνκ³ μ΄ λ‘μ§μ 보기 μν΄μ protected νμ΄μ§λ₯Ό λ§λ κ² κ°μλ° λ§μκΉμ?
console.error(error); | ||
}, [error]); | ||
|
||
if (error.message === 'Unauthorized') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
messageλ‘ κ΅¬λΆμ νλλ°, λ°±μλμμ μλ¬ μ messageλ₯Ό 보λ΄μ£Όκ³ μμ§ μμ μνμ
λλ€.
μ΄μ λν΄μ λ°±μλνν
μ¬μμ²μ ν κΉμ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- μ¬κΈ°μ μΈκΈνλ 'message'λ httpErrorHandler ν¨μλ₯Ό ν΅ν΄ μ‘λ μλΈν΄λμ€νλ μλ¬λ₯Ό μλ―Ένλ©°, μ΄λ λ°±μλμμ 보λ΄λ 'message'μ μ°¨μ΄κ° μμ΅λλ€.
- λ°±μλμ μν μ½λλ₯Ό μ¬μ©νμ¬ μλ¬λ₯Ό κ° κ²½μ°μ λ§κ² μλΈν΄λμ€ννλ©°, μ΄ κ³Όμ μμ 'message'λ₯Ό μ λ ₯νλ―λ‘ λ°±μλμ μ¬μμ²ν νμκ° μμ΅λλ€.
- λ²μΈλ‘ λ°±μλμμ μλ¬ μ½λκ° μκΈ΄λ€λ©΄, μμμ λ§ν μ΄μ λλ¬Έμ messageμ ν΄λΉ μλ¬ μ½λλ₯Ό λ£μ΄μΌ κ² λ€λ μκ°μ΄ λλ€μ.
π μμ λ΄μ©
π€ κ³ λ―Ό νλ λΆλΆ
μλ¬ λ°μ΄λ리μ λμ κ³Όμ
Next Js global error
μλ²μ ν΄λΌμ΄μΈνΈμ error μΈμ€ν΄μ€
error instanceof BadRequestError
μ κ°μ΄ μΈμ€ν΄μ€λ‘ λΆκΈ° μ²λ¦¬νλ €κ³ νμ΅λλ€.