heroku/sbt-heroku — pull request #1 by anfuerer (2014-09-11 22:38:26+00:00)
Title: better error handling of wrong app name configuration

Issue:
If a wrong Heroku app name was configured the plugin returned an
IOException when getting the config vars.

Fix:
Improve error handling Check first if the app is available with an API
call. If app is not available show a proper error message to the user.

Exception:
```
java.io.FileNotFoundException:
https://api.heroku.com/apps/something-wrong/config-vars
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
tion.java:1624)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsUR
LConnectionImpl.java:254)
at com.heroku.sbt.Curl$.apply(Curl.scala:16)
at com.heroku.sbt.GetConfigVars$.apply(Deploy.scala:181)
at com.heroku.sbt.Deploy$.apply(Deploy.scala:43)
at com.heroku.sbt.Deploy$.apply(Deploy.scala:24)
at
com.heroku.sbt.HerokuPlugin$autoImport$$anonfun$baseHerokuSettings$1.app
ly(HerokuPlugin.scala:20)
at
com.heroku.sbt.HerokuPlugin$autoImport$$anonfun$baseHerokuSettings$1.app
ly(HerokuPlugin.scala:18)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
at sbt.std.Transform$$anon$4.work(System.scala:64)
at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at
sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
at sbt.Execute.work(Execute.scala:244)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
at
sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictio
ns.scala:160)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav
a:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:615)
at java.lang.Thread.run(Thread.java:744)
```