fix bug that would only return error responses for 3rdparty apps

@tomneedham