Deal with "ghost" codes
There are some "ghost" codes in the Hydroportail.
We can see the behavior in the following way:
get_sf_hydro(code = "G410000301")
## Error: No feature found
get_meta_hydro(code = "G410000301")
## Error in names(x) <- value :
## 'names' attribute [2] must be the same length as the vector [1]
get_prod_hydro(code = "G410000301")
## named list()
## attr(,"meta_req")
## attr(,"meta_req")$urlRequest
## character(0)
##
## attr(,"meta_req")$user
## attr(,"meta_req")$user$name
## user
## "odelaigue"
##
## attr(,"meta_req")$user$date
## [1] "2022-06-14 09:47:04 CEST"
Using this URL: https://www.hydro.eaufrance.fr/stationhydro/G410000301/fiche