Skip to content

Add http error handling and fix refresh endpoint#9

Merged
kryakobess merged 4 commits into
mainfrom
feature/advice
Jun 9, 2025
Merged

Add http error handling and fix refresh endpoint#9
kryakobess merged 4 commits into
mainfrom
feature/advice

Conversation

@kryakobess

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 8, 2025 19:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds HTTP error handling to the Twitter service by introducing an error DTO and a controller advice handler for a NotFoundException.

  • Added ApiErrorDto as a record to encapsulate error messages.
  • Added TwitterControllerAdvice with exception handling for NotFoundException.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/main/java/ru/randomwalk/twitterservice/model/dto/ApiErrorDto.java Introduces a simple error DTO using Java records and Lombok's @builder.
src/main/java/ru/randomwalk/twitterservice/controller/advice/TwitterControllerAdvice.java Implements exception handling logic, but includes an inconsistency in the HTTP status codes.

…witterControllerAdvice.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kryakobess kryakobess changed the title Add http error handling Add http error handling and fix refresh endpoint Jun 9, 2025
@kryakobess kryakobess merged commit d2a80c3 into main Jun 9, 2025
1 of 2 checks passed
@kryakobess kryakobess deleted the feature/advice branch June 9, 2025 12:50
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.

3 participants