Catch the exception from request.write synchronously and don't return the failure from processing_failed.