Skip to content

feat: add global error handling middleware - #2

Open
Abdalrahman-M05 wants to merge 2 commits into
feature/setup-slug-apifrom
feature/error-handling
Open

feat: add global error handling middleware#2
Abdalrahman-M05 wants to merge 2 commits into
feature/setup-slug-apifrom
feature/error-handling

Conversation

@Abdalrahman-M05

Copy link
Copy Markdown
Collaborator

Implement Task 2 (Stacked)

Exception exception,
CancellationToken cancellationToken)
{
var problemDetails = new ProblemDetails

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

add logging

Status = StatusCodes.Status500InternalServerError,
Title = "Server Error",

Detail = "An unexpected error occurred while processing your request. Please try again later."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

manual handling is not acceptable, we can not know the exact detail that cause the error, is it validation error?, if it's then which property caused the error, is it 500x error? etc.

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