You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a look, and it seems like it only happens when I try to add the item for the second time.
So for the first time, the app fetches data and creates a new DB item without a problem.
But for the second time when I enter the DOI-URL, the app again tries to fetch & add again, resulting in a failed constraint as below:
[blitz-rpc] createReferenceModule() Starting with input: {
doi: '10.1007/978-3-031-17037-9_4'
}
Error:
Invalid `prisma.module.create()` invocation:
Unique constraint failed on the fields: (`prefix`,`suffix`)
I will try fixing this problem by making sure that the workflow to add an existing module proceeds when the URL-DOI is inputted for an existing module.
I've been working on the ModuleEdit file. I noticed that the DOI with a URL will go to Algolia, but then the DOI with a URL will not produce a hit on the Algolia side, thus going into the routine for not-found.
I'm thinking of cleaning the query string before sending out to Algolia. I see that the current match is handeled with below code:
URL of the Page
/drafts
What happened?
As reported in #1991, we cannot add some DOIs formatted as a URL (e.g., https://doi.org/10.1007/978-3-031-17037-9_4)
I took a look, and it seems like it only happens when I try to add the item for the second time.
So for the first time, the app fetches data and creates a new DB item without a problem.
But for the second time when I enter the DOI-URL, the app again tries to fetch & add again, resulting in a failed constraint as below:
I will try fixing this problem by making sure that the workflow to add an existing module proceeds when the URL-DOI is inputted for an existing module.
Steps to reproduce
What browser(s) did you use?
Chrome
Anything else?
No response
The text was updated successfully, but these errors were encountered: