Return an error when get_buffer reads none or only partial data instead