ci: docker_tag=ext chore(back): log analyse IdNot (rattachement)
All checks were successful
build-and-push-ext / build_push (push) Successful in 15s
All checks were successful
build-and-push-ext / build_push (push) Successful in 15s
This commit is contained in:
parent
723b532c64
commit
8c8b9ce7d6
@ -21,3 +21,7 @@
|
||||
- Laisse désormais passer toute erreur avec `statusCode` 4xx même si l’instance n’est pas exactement celle des classes locales.
|
||||
- Fallback sur `name` (BusinessRuleError, ForbiddenError, UnauthorizedError, ValidationError) pour tolérer les divergences d’instances.
|
||||
- Objectif: éviter les 502 lorsqu’un cas fonctionnel (ex: utilisateur non rattaché) survient, et renvoyer le bon 4xx.
|
||||
|
||||
### v1.0.3+log
|
||||
|
||||
- Ajout d’un log d’analyse non sensible dans `IdNotController.authenticate` pour tracer: `profile_idn`, `entity_idn`, `entite.typeEntite.name`, `entite.codeCrpcen`, `statutDuRattachement`, `typeLien.name`.
|
||||
|
@ -104,6 +104,16 @@ export class IdNotController {
|
||||
// Get user data
|
||||
const userData = await IdNotService.getUserData(payload.profile_idn);
|
||||
|
||||
// Log d'analyse (non sensible) pour diagnostiquer les cas de rattachement
|
||||
Logger.info('IdNot userData summary', {
|
||||
profile_idn: payload.profile_idn,
|
||||
entity_idn: payload.entity_idn,
|
||||
entiteTypeName: userData?.entite?.typeEntite?.name,
|
||||
entiteCodeCrpcen: userData?.entite?.codeCrpcen,
|
||||
statutDuRattachement: userData?.statutDuRattachement,
|
||||
typeLien: userData?.typeLien?.name
|
||||
});
|
||||
|
||||
if (!userData || !userData.statutDuRattachement || userData.entite.typeEntite.name !== 'office') {
|
||||
throw new ForbiddenError('User not attached to an office');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user