Env vars for the two collections; return an error response on exceptions.