This prevents problems with different environments. Also introduces unit tests to double check HttpError values.