Reduced line count in error.rb and moved error handling into API#method_missing