trying to figure out how to add a error dictionary but i'm getting an error