lukebyrne/betfair — Issue #2: Change the returned error messages from API_ERROR to more specific error messages
Author: capsized
Created: 2012-01-06 04:59:17+00:00
State: open

Changing this would break something if you relied on the "API_ERROR" error message in you existing apps, but wouldn't it be more accurate if the API methods would return:
```ruby
response.to_hash[:name_of_api_call][:result][:header][:error_code]
```
instead of
```ruby
response.to_hash[:name_of_api_call][:result][:error_code]
```

See below a case where BF returns an error due to an invalid session.
Currently "API_ERROR" is returned by the gem which seems to be too generic and returning "NO_SESSION" instead seems more preferable. What do you think?

```xml

NO_SESSION

2012-01-06T04:38:28.568Z

API_ERROR

```