Set up error of the api flow