Skip to content

Added some exceptions#3

Merged
changchanghwang merged 3 commits intomainfrom
exception
Jul 31, 2023
Merged

Added some exceptions#3
changchanghwang merged 3 commits intomainfrom
exception

Conversation

@ActaV-N
Copy link
Copy Markdown
Collaborator

@ActaV-N ActaV-N commented Jul 31, 2023

자주쓰는 exceptions 3가지 추가했습니다

  • 401 unauthorized
  • 403 forbidden
  • 410 gone

}

export function unauthorized(message?: string, data?: { errorMessage?: string }) {
return new Exception(401, message ?? 'Bad Request', data);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return new Exception(401, message ?? 'Bad Request', data);
return new Exception(401, message ?? 'Unauthorized', data);

@changchanghwang changchanghwang merged commit 813f8a5 into main Jul 31, 2023
@changchanghwang changchanghwang deleted the exception branch July 31, 2023 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants