Catch the 'Bad API' error within the pasteRequest function.