[API change] ExternaAPIError on ngrams_url field
We meet this kind of error on requestiong tha OpenAlex API since few days:
[ERROR] [src/Gargantext/API/Node/Corpus/New.hs:218:12] ExternalAPIError OpenAlex (DecodeFailure "Error in $.results[0]: key \"ngrams_url\" not found" (Response {responseStatusCode = Status {statusCode = 200, statusMessage = "OK"}, responseHeaders = fromList [("Report-To","{\"group\":\"heroku-nel\",\"max_age\":3600,\"endpoints\":[{\"url\":\"https://nel.heroku.com/reports?ts=1725439155&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=mbz6mcQqceYsKOUdhfsZdYoreeNjbn%2Bi%2B2RsbN5B7dg%3D\"}]}"),("Reporting-Endpoints","heroku-nel=https://nel.heroku.com/reports?ts=1725439155&sid=1b10b0ff-8a76-4548-befa-353fc6c6c045&s=mbz6mcQqceYsKOUdhfsZdYoreeNjbn%2Bi%2B2RsbN5B7dg%3D"),("Nel","{\"report_to\":\"heroku-nel\",\"max_age\":3600,\"success_fraction\":0.005,\"failure_fraction\":0.05,\"response_headers\":[\"Via\"]}"),("Connection","keep-alive"),("Server","gunicorn"),("Date","Wed, 04 Sep 2024 08:39:16 GMT"),("Content-Type","application/json"),("Content-Length","14542"),("Access-Control-Allow-Origin","*"),("Access-Control-Allow-Methods","POST, GET, OPTIONS, PUT, DELETE, PATCH"),("Access-Control-Allow-Headers","Origin, X-Requested-With, Content-Type, Accept, Authorization, Cache-Control"),("Access-Control-Expose-Headers","Authorization, Cache-Control"),("Access-Control-Allow-Credentials","true"),("X-Api-Pool","common"),("Content-Encoding","gzip"),("Vary","Accept-Encoding"),("X-Frame-Options","SAMEORIGIN"),("X-Xss-Protection","1; mode=block"),("X-Content-Type-Options","nosniff"),("Content-Security-Policy","default-src 'self'; object-src 'none'"),("Strict-Transport-Security","max-age=31556926; includeSubDomains"),("Referrer-Policy","strict-origin-when-cross-origin"),("Via","1.1 vegur")], responseHttpVersion = HTTP/1.1, responseBody = "{\"meta\":{\"count\":872846,\"db_response_time_ms\":790,\"page\":1,\"per_page\":1,\"groups_count\":null},\"results\":[{\"id\":\"https://openalex.org/W206829882\",\"doi\":\"https://doi.org/10.1176/ajp.144.6.736\",\"title\":\"Maternal affective disorders, illness, and stress: risk for children's psychopathology\",\"display_name\":\"Maternal affective disorders, illness, and stress: risk for children's psychopathology\",\"relevance_score\":1235.2802,\"publication_year\":1987,\"publication_date\":\"1987-06-01\",\"ids\":{\"openalex\":\"https://openalex.org/W206829882\",\"doi\":\"https://doi.org/10.1176/ajp.144.6.736\",\"mag\":\"206829882\",\"pmid\":\"https://pubmed.ncbi.nlm.nih.gov/3591993\"},\"language\":\"en\",\"primary_location\":{\"is_oa\":false,\"landing_page_url\":\"https://doi.org/10.1176/ajp.144.6.736\",\"pdf_url\":null,\"source\":{\"id\":\"https://openalex.org/S116025658\",\"display_name\":\"American Journal of Psychiatry\",\"issn_l\":\"0002-953X\",\"issn\":[\"0002-953X\",\"1535-7228\"],\"is_oa\":false,\"is_in_doaj\":false,\"is_core\":true,\"host_organization\":\"https://openalex.org/P4310316602\",\"host_organization_name\":\"American Psychiatric Association\",\"host_organization_lineage\":[\"https://openalex.org/P4310316602\"],\"host_organization_lineage_names\":[\"American Psychiatric Association\"],\"type\":\"journal\"},\"license\":null,\"license_id\":null,\"version\":null,\"is_accepted\":false,\"is_published\":false},\"type\":\"article\"...
It seems that ngrams_url
is not anymore a systematic variable in the response.