added OC_DB::isError and logging for #3486

cc @DeepDiver1975 @schiesbn @icewind1991