do we need to handle an exception here if the error is not in json etc?