Skip to content

Comments

FINERACT-2502: Resolve the issue 403 Forbidden error when a client is missing a profile image#5532

Open
ibhoomi16 wants to merge 1 commit intoapache:developfrom
ibhoomi16:fix/client-image-403-error
Open

FINERACT-2502: Resolve the issue 403 Forbidden error when a client is missing a profile image#5532
ibhoomi16 wants to merge 1 commit intoapache:developfrom
ibhoomi16:fix/client-image-403-error

Conversation

@ibhoomi16
Copy link

@ibhoomi16 ibhoomi16 commented Feb 23, 2026

Description

This PR resolves the issue where a "403 Forbidden" error alert appears on the UI when a client is missing a profile image.

Jira Ticket: FINERACT-2502

Changes:
Changes:

  • Updated DocumentNotFoundException to extend AbstractPlatformResourceNotFoundException so it correctly maps to 404.
  • Removed generic exception wrapping in ImageReadPlatformServiceImpl to stop hiding the "Not Found" error.
  • Added ImageReadPlatformServiceImplTest to verify that DocumentNotFoundException is thrown for missing images.
    Verification:
  • Verified with Postman that missing images now return 404 Not Found (Previously 403 Forbidden).

Checklist

@IOhacker
Copy link
Contributor

@ibhoomi16 the Commit message and the PR message must be "FINERACT-2502: Resolve the issue 403 Forbidden error when a client is missing a profile image". Remove any other Jira ticket unrelaed to this one.

Link to Apache Fineract Jira ticket https://issues.apache.org/jira/browse/FINERACT-2502

Make sure that you are including a Test class and please sign your commit.

Copy link
Contributor

@IOhacker IOhacker left a comment

Choose a reason for hiding this comment

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

Kindly see my comments

@ibhoomi16 ibhoomi16 force-pushed the fix/client-image-403-error branch from d0019c2 to c9e819b Compare February 23, 2026 19:35
@ibhoomi16 ibhoomi16 changed the title WEB-758: Return 404 instead of 403 for missing client images FINERACT-2502: Resolve the issue 403 Forbidden error when a client is missing a profile image Feb 23, 2026
@ibhoomi16 ibhoomi16 force-pushed the fix/client-image-403-error branch 2 times, most recently from 57cc32c to 1292bde Compare February 23, 2026 20:43
@ibhoomi16
Copy link
Author

I have updated the PR as requested.

@ibhoomi16 ibhoomi16 force-pushed the fix/client-image-403-error branch 3 times, most recently from 89ac848 to fa4c79c Compare February 24, 2026 07:27
@IOhacker
Copy link
Contributor

Run './gradlew :fineract-document:spotlessApply' to fix these violations.

@ibhoomi16 ibhoomi16 force-pushed the fix/client-image-403-error branch from fa4c79c to cf2b788 Compare February 24, 2026 09:43
@ibhoomi16 ibhoomi16 requested a review from IOhacker February 24, 2026 09:47
@IOhacker
Copy link
Contributor

@ibhoomi16 please make sure that you got a Signed Commit:

All committers already have PGP/GPG keys, so just make sure you're also signing commits. You can add this to your ~/.gitconfig (or equivalent) to do it automatically:

[commit]
gpgSign = true

Upload your public key to github to make the verified badges green.

More info: FINERACT-2177, PR #5431.

Hints: 1) try it locally before pushing. 2) have git run it for you: Create .git/hooks/pre-push with:

#!/bin/sh
scripts/verify-signed-commits.sh --strict

Be sure to make that script executable.

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