Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: POC RNF #751

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

feat: POC RNF #751

wants to merge 2 commits into from

Conversation

XavierJp
Copy link
Contributor

@XavierJp XavierJp commented Nov 2, 2023

Context

The MI is currently working on a new DB called RNF (Répertoire National des Fondations).

They needs a platform to :

  • execute full text search
  • access DB

Current scope

First implementation of RNF :

  • only handle redirection of a valid RNF Id to a dedicated page /fondation/<ID_RNF>
  • only works on preprod for a given ID 075-FDD-00003-01
  • do not allow full text search (need stock and actual data first)

Next steps :

  • share review app with MI team
  • ask the MI team what is the real ID RNF format mask
  • update the Invalid / Not found workflows

closes #731

@XavierJp XavierJp marked this pull request as draft November 2, 2023 13:11
Copy link
Contributor

@HAEKADI HAEKADI left a comment

Choose a reason for hiding this comment

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

Nice!

Comment on lines +322 to +324
constructor(public message: string) {
super();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can omit the constructor...

utils/server-side-props-helper/redirects.ts Outdated Show resolved Hide resolved
Comment on lines 49 to 60
exception instanceof NotASiretError
) {
return redirectPageNotFound(message, scope);
} else if (exception instanceof IsLikelyAnIdRnfException) {
return redirectIfIdRnf(message);
} else if (exception instanceof NotAnIdRnfError) {
return redirectIdRnfInvalid(message);
} else if (exception instanceof RnfNotFoundError) {
return redirectIdRnfIntrouvable(message);
} else if (exception instanceof HttpNotFound) {
return redirectPageNotFound(message, scope);
} else if (exception instanceof SearchEngineError) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a bit weird for me to use exception in that case. I'm not sure it should be handled as such, but instead, a well crafted type return type and a switch case in the top of the route. But this is outside of the scope of this PR

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.

[POC] Repertoire National des Fondations
3 participants