add a bit of documentation on 'when'
add errors_by_name and errors_by_id to result