I wrote this before-  "I'm still a bit confused about the message argument. On all calls to handleFailedApi, we specify a message but we are using the message inside the response instead in most of the cases."

So, we pass the resp. object , the message and the error id to the function;
Inside, as you suggested, I'm checking for messages that came in the response object and if I find, I show them;