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: fallback mechanism to search for products with other providers #753

24 changes: 24 additions & 0 deletions docs/notebooks/api_user_guide/4_search.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,30 @@
"source": [
"The logs above show that the random kwarg passed to the [search()](../../api_reference/core.rst#eodag.api.core.EODataAccessGateway.search) method was indeed propagated to the request made to *PEPS*. It happens that *PEPS* accept unsupported parameters and still returned products, another provider might just have sent an error."
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## Fallback in case of error\n",
"\n",
"Usually, the search request is made to the provider with the highest priority. This can be the provider given in the request parameters or the provider previously configured as preferred provider. If the request to this provider fails, i.e. if an error is returned (for example because the provider is currently unavailable), a request to the the provider with the next highest priority offering the desired product will be attempted. In this case a warning message will be shown in the logs. If the request fails for all providers offering the desired product, an error message will be returned."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "Log"
}
},
"outputs": [],
"source": [
"2023-07-03 13:38:24,041 eodag.core [INFO] (core) No result from provider 'peps' due to an error during search. Raise verbosity of log messages for details\n",
"2023-07-03 13:38:24,041 eodag.core [WARNING] (core) No result could be obtained from provider peps, we will try to get the data from another provider"
]
}
],
"metadata": {
Expand Down
Loading