HTTPstatus.Rd
This function interprets the meaning of the HTTP status and returns the elements needed to create an appropriate warning and return something meaningful to the user.
HTTPstatus(status)
status | numeric, the error status |
---|
A list of two elements. `warning` is used to create a warning message and `rtn` will be used to return to the user.
Code 200 should not be sent to this function as this is only designed to handle the errors (>=400)
HTTPstatus(400)#> $warning #> [1] "Pl@ntNet returned: Bad request" #> #> $rtn #> [1] "Bad request" #>