Skip to content

refactor: improvements for error handling#2139

Draft
jlahovnik wants to merge 4 commits intodevelopfrom
error-handling-improvemnt
Draft

refactor: improvements for error handling#2139
jlahovnik wants to merge 4 commits intodevelopfrom
error-handling-improvemnt

Conversation

@jlahovnik
Copy link
Copy Markdown
Collaborator

  • handle 429 error response returned by provider
  • use order status as status message if no message in provider response

@jlahovnik jlahovnik self-assigned this Apr 9, 2026
@jlahovnik jlahovnik marked this pull request as draft April 9, 2026 15:38
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

Test Results

  1 files   -     3    1 suites   - 3   28s ⏱️ - 3m 0s
743 tests +    3  741 ✅ +    1  0 💤 ±0  2 ❌ +2 
764 runs   - 2 238  762 ✅  - 2 238  0 💤  - 2  2 ❌ +2 

For more details on these failures, see this check.

Results for commit d9f13aa. ± Comparison against base commit dc47630.

♻️ This comment has been updated with latest results.

@eodag-bot
Copy link
Copy Markdown
Collaborator

eodag-bot commented Apr 9, 2026

badge

Code Coverage (Ubuntu)

Details
Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         251      11  95.62%   104-115, 377, 644
config.py                                      306      24  92.16%   70-72, 75, 78, 81, 85, 89, 93-95, 587-589, 711-713, 732, 740, 770-775, 777
crunch.py                                        2       0  100.00%
api/__init__.py                                  0       0  100.00%
api/collection.py                              151       8  94.70%   177, 213, 216, 323, 362, 365, 383, 386
api/core.py                                    778      57  92.67%   266, 552, 600, 643, 683, 703, 744-749, 774, 858-877, 891, 897, 1050, 1055, 1154, 1193-1194, 1290-1291, 1317, 1348-1349, 1375, 1388, 1449-1450, 1481-1482, 1556-1561, 1573-1576, 1688, 1921, 2078, 2189, 2277-2278
api/provider.py                                382      40  89.53%   186, 190-191, 316-337, 405, 521, 525-526, 531-534, 545, 621-631, 821-822, 870, 877, 891, 914-917, 951-958, 962-963
api/search_result.py                           138      12  91.30%   111, 123, 133, 154, 208, 266, 278, 413, 468-471
api/product/__init__.py                          7       0  100.00%
api/product/_assets.py                          54       4  92.59%   97, 191, 202-206
api/product/_product.py                        304      24  92.11%   200, 344, 370-373, 410, 421-422, 531, 560, 567, 606, 718, 761-764, 773-776, 830, 896, 908, 975
api/product/metadata_mapping.py                806      60  92.56%   125-127, 221-226, 250, 308-309, 355-356, 397, 418, 470-471, 508, 529-532, 555, 567-568, 609, 632, 657-660, 662-667, 732-737, 746, 752, 768, 776, 1010, 1163, 1185, 1194-1198, 1215-1220, 1353, 1376, 1385, 1407, 1412, 1464, 1536, 1557, 1583, 1597, 1622, 1668, 1737, 1812
api/product/drivers/__init__.py                 11       0  100.00%
api/product/drivers/base.py                     32       0  100.00%
api/product/drivers/generic.py                  11       0  100.00%
api/product/drivers/sentinel1.py                33       0  100.00%
api/product/drivers/sentinel2.py                33       0  100.00%
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 25       2  92.00%   48, 55
plugins/manager.py                             173      16  90.75%   102-107, 179, 201, 219-220, 232, 271-272, 372-375, 387-388
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           95       8  91.58%   163-165, 213-214, 240-242
plugins/apis/usgs.py                           182      25  86.26%   157, 263, 297, 339-341, 346, 374-375, 380, 410-417, 428-433, 455-461
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py             124      35  71.77%   52-54, 69-70, 142-149, 177-203, 226, 258-262, 279, 303, 319-320
plugins/authentication/base.py                  22       4  81.82%   45, 58, 81, 95
plugins/authentication/eoiam.py                 99       2  97.98%   171, 194
plugins/authentication/generic.py               16       3  81.25%   50, 55, 65
plugins/authentication/header.py                19       0  100.00%
plugins/authentication/keycloak.py              46       4  91.30%   154, 177-182
plugins/authentication/openid_connect.py       235      19  91.91%   98-99, 107-125, 172, 180, 194, 214, 353-356, 382, 423
plugins/authentication/qsauth.py                34       1  97.06%   91
plugins/authentication/sas_auth.py              57       3  94.74%   68, 89, 135
plugins/authentication/token.py                141       9  93.62%   192, 229, 309-310, 358-362
plugins/authentication/token_exchange.py        36      14  61.11%   75, 93-121
plugins/crunch/__init__.py                       6       0  100.00%
plugins/crunch/base.py                          12       0  100.00%
plugins/crunch/filter_date.py                   59       0  100.00%
plugins/crunch/filter_latest_intersect.py       54       6  88.89%   92-93, 100-101, 103-107
plugins/crunch/filter_latest_tpl_name.py        35       0  100.00%
plugins/crunch/filter_overlap.py                66      10  84.85%   118-121, 137-163
plugins/crunch/filter_property.py               30       0  100.00%
plugins/download/__init__.py                     4       0  100.00%
plugins/download/aws.py                        402      76  81.09%   271, 305, 354-357, 387-388, 396-400, 480-483, 523-525, 529, 560-561, 567-571, 602, 667-675, 739-834, 846-851, 889, 915, 960-962, 1014
plugins/download/base.py                       288      24  91.67%   135, 165, 371-372, 416, 450, 527-531, 561, 596-597, 622-631, 690, 711, 733, 741
plugins/download/http.py                       581      77  86.75%   232, 242, 284-287, 349-352, 355, 362-367, 398-400, 417, 432, 493, 528, 542, 556, 566-570, 586-591, 602, 621, 658-661, 682, 692, 699, 755, 864, 896, 912, 935-944, 980, 1025-1030, 1039, 1054-1056, 1060, 1063, 1078-1079, 1089, 1164, 1216, 1258-1259, 1271, 1281, 1337-1338, 1368, 1396, 1424, 1504-1505
plugins/search/__init__.py                      25       0  100.00%
plugins/search/base.py                         196      21  89.29%   109, 113, 137-143, 200-203, 218-221, 296, 317, 442, 492, 525-528, 537
plugins/search/build_search_result.py          520      91  82.50%   260-261, 297, 301, 321, 380, 550-561, 571-573, 659-665, 711, 735, 737, 804, 812-816, 837, 847, 873, 918, 943, 971, 989-1004, 1054, 1079, 1082, 1086, 1095, 1101, 1139-1160, 1201, 1228-1229, 1238-1247, 1311, 1326, 1332, 1351-1360, 1481-1482, 1526, 1535-1537, 1594, 1642-1652
plugins/search/cop_marine.py                   273      59  78.39%   57, 65-67, 77-78, 83, 88-89, 105, 107, 110, 176-177, 220, 238, 244, 248, 252, 263, 274-275, 283, 315-318, 324, 334, 347, 351, 355, 359, 363-367, 373-376, 379-396, 413-416, 469-473, 478, 490, 504-505
plugins/search/creodias_s3.py                   29       1  96.55%   59
plugins/search/csw.py                          112      87  22.32%   99-100, 104-105, 113-170, 176-189, 197-229, 247-288
plugins/search/qssearch.py                     855     102  88.07%   381, 426-427, 544-545, 568-569, 581-585, 816-822, 880, 946, 976, 983, 1054, 1075, 1078-1079, 1097, 1106-1107, 1134, 1206, 1215, 1220-1237, 1246, 1261, 1270, 1283, 1305, 1401, 1424, 1439, 1512-1513, 1515-1520, 1522-1523, 1617, 1624, 1732-1736, 1807, 1810, 1814-1815, 1836-1839, 1851, 1873-1885, 1893, 1928-1930, 1953-1959, 1966, 2020, 2043, 2048-2049, 2064, 2070, 2084, 2174, 2178, 2189, 2213, 2226, 2234-2244, 2282-2286
plugins/search/stac_list_assets.py              25      10  60.00%   44-51, 75-85
plugins/search/static_stac_search.py            84      18  78.57%   99-127, 166-169, 182, 224
resources/__init__.py                            0       0  100.00%
resources/shp/__init__.py                        0       0  100.00%
types/__init__.py                              167      43  74.25%   58, 62, 71-75, 86-98, 126-128, 135-140, 216, 219, 257, 267-283, 288, 290, 312, 317, 325, 335
types/bbox.py                                   39      19  51.28%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                          10       0  100.00%
types/queryables.py                            112       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/stac_extensions.py                       114       1  99.12%   282
types/stac_metadata.py                         120      16  86.67%   95, 116-117, 150, 180-194, 203-210
utils/__init__.py                              572      39  93.18%   60, 197, 228-229, 238-264, 267, 282, 362-366, 441-445, 525, 565-566, 595, 973-976, 1027, 1046-1047, 1076, 1094-1095, 1207, 1295, 1459, 1697
utils/cache.py                                  22       0  100.00%
utils/dates.py                                 182       4  97.80%   172, 516, 523-524
utils/deserialize.py                            73      10  86.30%   53, 55, 103, 108-109, 145, 159, 181-182, 188
utils/env.py                                     3       0  100.00%
utils/exceptions.py                             48       0  100.00%
utils/free_text_search.py                       65       2  96.92%   83, 91
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                31       1  96.77%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   38       0  100.00%
utils/requests.py                               55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/s3.py                                    240      12  95.00%   200-203, 245, 263, 489, 537-538, 585, 660, 686
utils/stac_reader.py                           113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
utils/streamresponse.py                         82       7  91.46%   24-26, 63, 124, 133, 145
TOTAL                                        10505    1255  88.05%

Diff against develop

Filename                      Stmts    Miss  Cover
--------------------------  -------  ------  --------
plugins/download/http.py         +7      +2  -0.18%
plugins/search/qssearch.py      +16      +7  -0.61%
utils/exceptions.py              +1       0  +100.00%
TOTAL                           +24      +9  -0.06%

Results for commit: d9f13aa

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

@eodag-bot
Copy link
Copy Markdown
Collaborator

badge

Code Coverage (Windows)

Details
Filename                                     Stmts    Miss  Cover    Missing
-----------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
__init__.py                                      8       0  100.00%
cli.py                                         251      11  95.62%   104-115, 377, 644
config.py                                      306      24  92.16%   70-72, 75, 78, 81, 85, 89, 93-95, 587-589, 711-713, 732, 740, 770-775, 777
crunch.py                                        2       0  100.00%
api/__init__.py                                  0       0  100.00%
api/collection.py                              151       8  94.70%   177, 213, 216, 323, 362, 365, 383, 386
api/core.py                                    778      57  92.67%   266, 552, 600, 643, 683, 703, 744-749, 774, 858-877, 891, 897, 1050, 1055, 1154, 1193-1194, 1290-1291, 1317, 1348-1349, 1375, 1388, 1449-1450, 1481-1482, 1556-1561, 1573-1576, 1688, 1921, 2078, 2189, 2277-2278
api/provider.py                                382      40  89.53%   186, 190-191, 316-337, 405, 521, 525-526, 531-534, 545, 621-631, 821-822, 870, 877, 891, 914-917, 951-958, 962-963
api/search_result.py                           138      12  91.30%   111, 123, 133, 154, 208, 266, 278, 413, 468-471
api/product/__init__.py                          7       0  100.00%
api/product/_assets.py                          54       4  92.59%   97, 191, 202-206
api/product/_product.py                        304      24  92.11%   200, 344, 370-373, 410, 421-422, 531, 560, 567, 606, 718, 761-764, 773-776, 830, 896, 908, 975
api/product/metadata_mapping.py                806      60  92.56%   125-127, 221-226, 250, 308-309, 355-356, 397, 418, 470-471, 508, 529-532, 555, 567-568, 609, 632, 657-660, 662-667, 732-737, 746, 752, 768, 776, 1010, 1163, 1185, 1194-1198, 1215-1220, 1353, 1376, 1385, 1407, 1412, 1464, 1536, 1557, 1583, 1597, 1622, 1668, 1737, 1812
api/product/drivers/__init__.py                 11       0  100.00%
api/product/drivers/base.py                     32       0  100.00%
api/product/drivers/generic.py                  11       0  100.00%
api/product/drivers/sentinel1.py                33       0  100.00%
api/product/drivers/sentinel2.py                33       0  100.00%
plugins/__init__.py                              0       0  100.00%
plugins/base.py                                 25       2  92.00%   48, 55
plugins/manager.py                             173      16  90.75%   102-107, 179, 201, 219-220, 232, 271-272, 372-375, 387-388
plugins/apis/__init__.py                         0       0  100.00%
plugins/apis/base.py                             4       0  100.00%
plugins/apis/ecmwf.py                           95       8  91.58%   163-165, 213-214, 240-242
plugins/apis/usgs.py                           182      25  86.26%   157, 263, 297, 339-341, 346, 374-375, 380, 410-417, 428-433, 455-461
plugins/authentication/__init__.py               6       1  83.33%   31
plugins/authentication/aws_auth.py             124      35  71.77%   52-54, 69-70, 142-149, 177-203, 226, 258-262, 279, 303, 319-320
plugins/authentication/base.py                  22       4  81.82%   45, 58, 81, 95
plugins/authentication/eoiam.py                 99       2  97.98%   171, 194
plugins/authentication/generic.py               16       3  81.25%   50, 55, 65
plugins/authentication/header.py                19       0  100.00%
plugins/authentication/keycloak.py              46       4  91.30%   154, 177-182
plugins/authentication/openid_connect.py       235      19  91.91%   98-99, 107-125, 172, 180, 194, 214, 353-356, 382, 423
plugins/authentication/qsauth.py                34       1  97.06%   91
plugins/authentication/sas_auth.py              57       3  94.74%   68, 89, 135
plugins/authentication/token.py                141       9  93.62%   192, 229, 309-310, 358-362
plugins/authentication/token_exchange.py        36      14  61.11%   75, 93-121
plugins/crunch/__init__.py                       6       0  100.00%
plugins/crunch/base.py                          12       0  100.00%
plugins/crunch/filter_date.py                   59       0  100.00%
plugins/crunch/filter_latest_intersect.py       54       6  88.89%   92-93, 100-101, 103-107
plugins/crunch/filter_latest_tpl_name.py        35       0  100.00%
plugins/crunch/filter_overlap.py                66      10  84.85%   118-121, 137-163
plugins/crunch/filter_property.py               30       0  100.00%
plugins/download/__init__.py                     4       0  100.00%
plugins/download/aws.py                        402      76  81.09%   271, 305, 354-357, 387-388, 396-400, 480-483, 523-525, 529, 560-561, 567-571, 602, 667-675, 739-834, 846-851, 889, 915, 960-962, 1014
plugins/download/base.py                       288      26  90.97%   135, 165, 232-234, 371-372, 416, 450, 527-531, 561, 596-597, 622-631, 690, 711, 733, 741
plugins/download/http.py                       581      77  86.75%   232, 242, 284-287, 349-352, 355, 362-367, 398-400, 417, 432, 493, 528, 542, 556, 566-570, 586-591, 602, 621, 658-661, 682, 692, 699, 755, 864, 896, 911, 934-943, 979, 1024-1029, 1038, 1053-1055, 1059, 1062, 1077-1078, 1088, 1163, 1215, 1257-1258, 1270, 1280, 1336-1337, 1367, 1395, 1423, 1503-1504
plugins/search/__init__.py                      25       0  100.00%
plugins/search/base.py                         196      21  89.29%   109, 113, 137-143, 200-203, 218-221, 296, 317, 442, 492, 525-528, 537
plugins/search/build_search_result.py          520      91  82.50%   260-261, 297, 301, 321, 380, 550-561, 571-573, 659-665, 711, 735, 737, 804, 812-816, 837, 847, 873, 918, 943, 971, 989-1004, 1054, 1079, 1082, 1086, 1095, 1101, 1139-1160, 1201, 1228-1229, 1238-1247, 1311, 1326, 1332, 1351-1360, 1481-1482, 1526, 1535-1537, 1594, 1642-1652
plugins/search/cop_marine.py                   273      59  78.39%   57, 65-67, 77-78, 83, 88-89, 105, 107, 110, 176-177, 220, 238, 244, 248, 252, 263, 274-275, 283, 315-318, 324, 334, 347, 351, 355, 359, 363-367, 373-376, 379-396, 413-416, 469-473, 478, 490, 504-505
plugins/search/creodias_s3.py                   29       1  96.55%   59
plugins/search/csw.py                          112      87  22.32%   99-100, 104-105, 113-170, 176-189, 197-229, 247-288
plugins/search/qssearch.py                     848      98  88.44%   381, 426-427, 544-545, 568-569, 581-585, 816-822, 880, 946, 976, 983, 1054, 1075, 1078-1079, 1097, 1106-1107, 1134, 1206, 1215, 1220-1237, 1246, 1261, 1270, 1283, 1305, 1401, 1424, 1497-1498, 1500-1501, 1517, 1607, 1614, 1722-1726, 1797, 1800, 1804-1805, 1826-1829, 1841, 1863-1875, 1883, 1918-1920, 1943-1949, 1956, 2010, 2033, 2038-2039, 2054, 2060, 2074, 2164, 2168, 2179, 2203, 2216, 2224-2234, 2272-2276
plugins/search/stac_list_assets.py              25      10  60.00%   44-51, 75-85
plugins/search/static_stac_search.py            84      18  78.57%   99-127, 166-169, 182, 224
resources/__init__.py                            0       0  100.00%
resources/shp/__init__.py                        0       0  100.00%
types/__init__.py                              167      43  74.25%   58, 62, 71-75, 86-98, 126-128, 135-140, 216, 219, 257, 267-283, 288, 290, 312, 317, 325, 335
types/bbox.py                                   39      19  51.28%   46-61, 72-74, 85-87, 99-101, 113-115, 123
types/download_args.py                          10       0  100.00%
types/queryables.py                            112       0  100.00%
types/search_args.py                            70      18  74.29%   60-64, 71-88, 103
types/stac_extensions.py                       114       1  99.12%   282
types/stac_metadata.py                         120      16  86.67%   95, 116-117, 150, 180-194, 203-210
utils/__init__.py                              572      39  93.18%   60, 197, 228-229, 238-264, 267, 282, 362-366, 441-445, 525, 565-566, 595, 973-976, 1027, 1046-1047, 1076, 1094-1095, 1207, 1295, 1459, 1697
utils/cache.py                                  22       0  100.00%
utils/dates.py                                 182       4  97.80%   172, 516, 523-524
utils/deserialize.py                            73      10  86.30%   53, 55, 103, 108-109, 145, 159, 181-182, 188
utils/env.py                                     3       0  100.00%
utils/exceptions.py                             48       0  100.00%
utils/free_text_search.py                       65       2  96.92%   83, 91
utils/import_system.py                          28      19  32.14%   64-78, 89-99
utils/logging.py                                31       1  96.77%   41
utils/notebook.py                               44      23  47.73%   25-29, 36-41, 58-62, 72-78, 83-87
utils/repr.py                                   38       0  100.00%
utils/requests.py                               55      29  47.27%   51-52, 64, 85-96, 107-124, 128
utils/s3.py                                    240      12  95.00%   200-203, 245, 263, 489, 537-538, 585, 660, 686
utils/stac_reader.py                           113      44  61.06%   63-85, 95-97, 101, 138, 154-159, 206-216, 226-256
utils/streamresponse.py                         82       7  91.46%   24-26, 63, 124, 133, 145
TOTAL                                        10498    1253  88.06%

Diff against develop

Filename                      Stmts    Miss  Cover
--------------------------  -------  ------  --------
plugins/download/http.py         +7      +2  -0.18%
plugins/search/qssearch.py       +9      +3  -0.24%
utils/exceptions.py              +1       0  +100.00%
TOTAL                           +17      +5  -0.03%

Results for commit: 4725357

Minimum allowed coverage is 70%

♻️ This comment has been updated with latest results

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.

2 participants