Add `errors` and `notes` to method metadata

This is a backport of #113 from the master (2.x).