Handle lock error separately for JSON API