Change error type to CorruptInputError, like in encoding/*
Change variable names