Running examples in ‘nhdplusTools-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: get_flowline_index
> ### Title: Get Flowline Index
> ### Aliases: get_flowline_index
> 
> ### ** Examples
> 
> sample_flines <- sf::read_sf(system.file("extdata",
+                                          "petapsco_flowlines.gpkg",
+                                          package = "nhdplusTools"))
> get_flowline_index(sample_flines,
+                    sf::st_sfc(sf::st_point(c(-76.87479,
+                                              39.48233)),
+                               crs = 4326))
# A tibble: 1 x 5
     id    COMID REACHCODE      REACH_meas   offset
  <int>    <int> <chr>               <dbl>    <dbl>
1     1 11689978 02060003001472       51.5 0.000301
> 
> get_flowline_index("download_nhdplusv2",
+                    sf::st_sfc(sf::st_point(c(-76.87479,
+                                              39.48233)),
+                               crs = 4326))
Something went wrong with a web request.
 Error: Cannot open "<?xml version="1.0" encoding="UTF-8"?><ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://labs.waterdata.usgs.gov/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.RuntimeException: Unable to obtain connection: The connection attempt failed.
Unable to obtain connection: The connection attempt failed.
The connection attempt failed.
observations-prod-external.c8adwxz9sely.us-west-2.rds.amazonaws.com</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
"; Check connection parameters.

Error in check_names(flines, "get_flowline_index") : 
  Missing some required attributes in call to: get_flowline_index. Expected: COMID, REACHCODE, ToMeas, FromMeas or NHDPlusHR equivalents.
Calls: get_flowline_index -> check_names
Execution halted