# Can I capture a HTTP Connection Error

**URL:** <https://forum.inductiveautomation.com/t/can-i-capture-a-http-connection-error/24844>\
**Category:** Ignition\
**Created:** [May 9, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/can-i-capture-a-http-connection-error/24844 "2019-05-09T15:52:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julio.Bautista](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@Julio.Bautista](https://forum.inductiveautomation.com/u/Julio.Bautista)\
**Post date:** [May 9, 2019, 3:52pm UTC](https://forum.inductiveautomation.com/t/can-i-capture-a-http-connection-error/24844/1 "2019-05-09T15:52:55Z")

</div>

Is there a way I can do a try except, but only for a connection error when I conduct a web service call

Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: HTTP Error: 503 - Service Unavailable (at [https://RDG12006.QPLAS.COM:30518/m3api-rest/execute/PMS230MI/Select;maxrecs=0;excludempty=false;metadata=false;returncols=MFN1,WOS1,SCH1,SCH2,WOS2?CONO=001&FACI=100&PLGR=2004](https://RDG12006.QPLAS.COM:30518/m3api-rest/execute/PMS230MI/Select;maxrecs=0;excludempty=false;metadata=false;returncols=MFN1,WOS1,SCH1,SCH2,WOS2?CONO=001&FACI=100&PLGR=2004))

 ![web%20service%20error](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/1981566c1277b06231d61743fd67db05d1359ffb.png)

---

<div class="post-metadata">

**Author:** ![connor.elison](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@connor.elison](https://forum.inductiveautomation.com/u/connor.elison)\
**Post date:** [May 9, 2019, 4:31pm UTC](https://forum.inductiveautomation.com/t/can-i-capture-a-http-connection-error/24844/2 "2019-05-09T16:31:19Z")

</div>

In the designer on the configuration screen for that web service consumer you can unselect “Enable error reporting for failure HTTP response codes.” If you do that you will get back the http response instead of an exception and then you can take appropriate action from there in your script depending on the response code.
