Return error when using the apis with emulator