Aman-Mittal opened a new issue, #487:
URL: https://github.com/apache/fineract-backoffice-ui/issues/487
## What happens
Two requests 404 on every page load of a default deployment:
```
GET /branding/config.json?cb=1788679060016 404
GET /branding/i18n/en.json 404
```
These come from the L3/L4 deployment overlay described in
`DOCS/CUSTOMIZATION.md`.
## The files being missing is correct — surfacing it as an error is not
`src/app/core/services/config.service.ts` documents the overlay as expected
to be absent:
```
/**
* ...
* Gitignored, never written by upstream, and expected to be absent.
*/
const DEPLOYMENT_OVERLAY_URL = 'branding/config.json';
```
The same holds for `OVERLAY_PREFIX = 'branding/i18n/'` in
`src/app/core/adapters/i18n/deployment-translate.loader.ts`.
So an install where no deployer has configured white-label overrides — the
default, and the state of every fresh deployment — is a fully supported
configuration that nonetheless reports two network-level errors on every route.
The service's own comment says these files should not be there; the browser
says something is wrong. Both cannot be right.
## Why it matters
This app already logs `Failed to construct 'URL': Invalid base URL` twice
and two Ionicons warnings per page load (both filed separately). Adding these
two 404s means **six recurring console entries on every load before the user
has done anything**. A developer debugging a real problem has to learn to
filter six known-noisy entries first, which is exactly how a genuine new error
gets missed.
It also gives a deployer evaluating the customisation system a false signal
that they have misconfigured something when they have not configured anything.
## Suggested fix
Treat a 404 on the overlay as the documented "no overlay configured" case
rather than as a failure:
- Probe with a request whose failure is expected and handled, and log at
`debug`/`info` — not as an uncaught network error — when it comes back 404.
- Or gate the fetch behind an explicit opt-in (a `brandingOverlayEnabled`
flag in `config.json`, defaulting off), so a deployment that has not configured
branding never issues the request at all. This also drops two requests from
every cold load.
The second is cleaner: the current code cannot distinguish "no overlay
configured" from "overlay configured but misdeployed", and a flag makes that
difference explicit and reportable.
## Environment
Reproduced against a clean checkout of `main` (`a24a06ba`) served with `ng
serve`, Chrome. Both 404s appear in the network log on every route load.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]