Class: Response::RaiseMtGoxError

Inherits:
Middleware
  • Object
show all
Defined in:
lib/faraday/response/raise_mtgox_error.rb

Instance Method Summary collapse

Instance Method Details

#on_complete(env) ⇒ Object



5
6
7
8
9
# File 'lib/faraday/response/raise_mtgox_error.rb', line 5

def on_complete(env)
  if 200 == env[:status] && 'MySQL error, please retry later' == env[:body]
    raise MtGox::MysqlError, "MySQL error, please retry later"
  end
end