add res to error

this is the only way to get res in co
add registry