Skip to content

error message when only 1 number is used as a constraint #108

@oceanwatch

Description

@oceanwatch
Session Info

It would be helpful to have a more explicit error message reminding users to pass a vector of length 2 for each constraints. When only 1 number is passed, the error message is confusing:

library(rerddap)

ERDDAP_Node <- "https://coastwatch.pfeg.noaa.gov/erddap/"
dataInfo <- rerddap::info('jplMURSST41', 
                          url=ERDDAP_Node)

var <- dataInfo$variable$variable_name
date1="2014-01-01"

dat <- griddap(
  url=ERDDAP_Node, "jplMURSST41",
  time = date1,
  latitude = c(41.01585, 44.6308),
  longitude = c(-72.41734, -65.96161),
  fields = var[1]
)

gives this error message:
Error: Error {
code=500;
message="Internal Server Error: Error: destinationVariableName=analysed_sst2014-01-01 wasn't found in datasetID=jplMURSST41.";
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions