An upstate appeals court upheld a $35,000 award to a man who spent 23 days wrongfully imprisoned in what the judges compared to a scene from a Franz Kafka novel.

Robert Miller correctly told prison officials that he had completed his sentence at Rikers Island on a narcotics-related charge, but the Appellate Division, Third Department, said he was mistakenly transferred to the Downstate Correctional Facility in Dutchess County.