catch wrong api return code