This function creates an error message given the code and the message returned by an API
a new response message with empty data
This function creates an error message given the code and the message returned by an API