Skip to content

fix: Refactored uploadProfileImage method exceptions#701

Merged
Am0du merged 2 commits intohngprojects:devfrom
nevisadhiambo:feat-profile-image
Mar 2, 2025
Merged

fix: Refactored uploadProfileImage method exceptions#701
Am0du merged 2 commits intohngprojects:devfrom
nevisadhiambo:feat-profile-image

Conversation

@nevisadhiambo
Copy link
Contributor

Improved Exception Handling

  • Throws BadRequestException for missing files and invalid file types
  • Throws ProfilePictureUploadException instead of returning a ResponseEntity inside the catch block.
  • Enhances consistency and allows centralized exception handling.

Benefits

✅ Cleaner and more readable code.
✅ Improved maintainability by separating concerns.
✅ Follows the required standards

@nevisadhiambo nevisadhiambo changed the title fix: Refactor uploadProfileImage method for better readability and excepti… fix: Refactor uploadProfileImage method for error/exception handling Mar 2, 2025
@nevisadhiambo nevisadhiambo changed the title fix: Refactor uploadProfileImage method for error/exception handling fix: Refactor uploadProfileImage method exceptions Mar 2, 2025
@nevisadhiambo nevisadhiambo changed the title fix: Refactor uploadProfileImage method exceptions fix: Refactored uploadProfileImage method exceptions Mar 2, 2025
@Am0du Am0du merged commit 8c8ded7 into hngprojects:dev Mar 2, 2025
1 check failed
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