Add `#to_json` method to errors and error