basically you perform here to actions

1. generating auth hash
2. checking for errors

I think we can get rid of this method

first, define method which returns options hash for each request, or base options hash which can be extended if needed. Like this

    def http_party_options
      {basic_auth: { username: Targetprocess.configuration.username, password: Targetprocess.configuration.password }}
    end

then use HTTParty.get(url, http_party_options) in all your actions (get, post, delete methods). At the same action put your error check.