CircleCI-Public / jira-connect-orb

Display the status of CircleCI workflows and deployments in Jira!
https://circleci.com/orbs/registry/orb/circleci/jira
MIT License
25 stars 27 forks source link

[semver:patch] echo URL on fetch failure #67

Closed arjansingh closed 3 years ago

arjansingh commented 3 years ago

Checklist

This checklist is not applicable:

Motivation, issues

I am trying to debug why the Orb is failing when I try to install it.

The error message when the curl fails is unhelpful because I cannot tell which of the several this program makes is failing.

Example Output:

Curl failed with code 404. full response below.
<!DOCTYPE html>
<html><head><title>Continuous Integration and Deployment</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"><meta content="width=device-width, initial-scale=1" name="viewport"><meta content="CircleCI" name="apple-mobile-web-app-title"><meta content="Hosted Continuous Integration for web applications. Set up your application for testing in one click, on the fastest testing platform on the internet." name="description"><link href="https://dmmj3mmt94rvw.cloudfront.net/favicon-undefined.ico" rel="icon" type="image/png"><link href="https://dmmj3mmt94rvw.cloudfront.net/assets/css/app-2aee31877418f72a53af30f3775829e4.css" rel="stylesheet" type="text/css"><script type="text/javascript">var circleEnvironment = "production";var circleHost = "circle-www-api-v1-5b844c9996-kbwpf";var current_manifest_version_key = "frontend-releases/v3/3e3971eb5e8d270ec6e77c07b0a750a96324539a.json";var segmentWriteKey = 'AbgkrgN4cbRhAVEwlzMkHbwvrXnxHh35';var CSRFToken = 'Tz5GvMduPotTinozxr84U3saQXD3LPRsEN9Ebun9kUvti4yxBGpfKhaMsMA6yajYqhYGEH3dzZPXLqlf';var OAuthCSRFToken = 'GzlPJRna7EHPgHulgy9Ix1ieFBH2TGdqy2A75n0Cq1jl9HxvibKaf7ENGy_Eug_GY9IQjwPEC-boLdZ6';</script><meta content="{&quot;assetsRoot&quot;:&quot;https://dmmj3mmt94rvw.cloudfront.net&quot;,&quot;enterprise&quot;:false,&quot;enabled_auth_providers&quot;:[&quot;github&quot;,&quot;bitbucket&quot;],&quot;analytics_enabled&quot;:true,&quot;githubHttpEndpoint&quot;:&quot;https://github.com&quot;,&quot;is_1_0_enabled&quot;:false,&quot;enabled_code_providers&quot;:[&quot;github&quot;,&quot;bitbucket&quot;],&quot;support_email&quot;:&quot;sayhi@circleci.com&quot;,&quot;support_enabled&quot;:false,&quot;pusher&quot;:{&quot;key&quot;:&quot;1cf6e0e755e419d2ac9a&quot;},&quot;user_session_settings&quot;:null,&quot;auth_protocol&quot;:&quot;https&quot;,&quot;current_user&quot;:null,&quot;zuora_urls&quot;:{&quot;hosted_url&quot;:&quot;https://www.zuora.com/apps/PublicHostedPageLite.do&quot;,&quot;signature_url&quot;:&quot;https://api.zuora.com/rest/v1/rsa-signatures&quot;,&quot;script_url&quot;:&quot;https://static.zuora.com/Resources/libs/hosted/1.3.0/zuora-min.js&quot;},&quot;status&quot;:404,&quot;logging_enabled&quot;:false,&quot;log_channels&quot;:false,&quot;instrument&quot;:false,&quot;bitbucketClientId&quot;:&quot;4DMqkNUJUMcdfnFtDU&quot;,&quot;is_2_0_enabled&quot;:true,&quot;githubClientId&quot;:&quot;78a2ba87f071c28e65bb&quot;,&quot;env&quot;:&quot;production&quot;,&quot;auth_host&quot;:null,&quot;loginBannerMessage&quot;:null,&quot;flash&quot;:null,&quot;can_create_user&quot;:true,&quot;stripePublishableKey&quot;:&quot;pk_ZPBtv9wYtkUh6YwhwKRqL0ygAb0Q9&quot;}" id="28ea2bf3-3478-40fc-915a-66584636ede4" /><script type="text/javascript">var renderContext = JSON.parse(document.getElementById('28ea2bf3-3478-40fc-915a-66584636ede4').content);</script><script async src="https://cdn.optimizely.com/js/14812510231.js" type="text/javascript"></script>
<script type="text/javascript">
!function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement("script");n.type="text/javascript";n.async=!0;n.src="https://cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION="4.1.0";
var optout = window.renderContext.current_user &&
    window.renderContext.current_user.privacy_optout;

if (optout) {
  analytics.load(segmentWriteKey, {
    integrations: {
      All: false,
      Amplitude: true,
      Postgres: true
    }
  });
} else {
  analytics.load(segmentWriteKey);
}
}}();
</script>

<script src="//d3dy5gmtp8yhk7.cloudfront.net/2.2/pusher.min.js" type="text/javascript"></script><meta content="{&quot;user&quot;:{&quot;email&quot;:null,&quot;name&quot;:null,&quot;key&quot;:&quot;&quot;,&quot;custom&quot;:{&quot;organizations&quot;:[],&quot;in_beta_program&quot;:null,&quot;enrolled_betas&quot;:null,&quot;free&quot;:true}},&quot;client-id&quot;:&quot;562fbc5f169cf106f1000015&quot;,&quot;flags&quot;:{&quot;update-zuora-billing-info&quot;:false,&quot;circle-11121-uncertified-orbs-allowed&quot;:true,&quot;disable-performance-signup&quot;:false,&quot;new-build-logs&quot;:false,&quot;force-redirect-to-new-ui&quot;:false,&quot;circle-6591-migrate-to-js-card&quot;:null,&quot;project-cache-clear-buttons&quot;:null,&quot;plan-overview-loading-override&quot;:false,&quot;project-set-up-march-2019&quot;:&quot;not-in-test&quot;,&quot;allow-interim-performance-chargify&quot;:false,&quot;show-active-users&quot;:true,&quot;org-usage-banners&quot;:true,&quot;circle-13360-gh-checks&quot;:true,&quot;free-check-in-execution-authorized&quot;:true,&quot;eol-banners&quot;:true,&quot;swap-authorized-event-names&quot;:true,&quot;job-page-sort-by-repo-name-alphabetically&quot;:false,&quot;orbs-enabled&quot;:true,&quot;pipelines-opt-in-banner&quot;:true,&quot;upgrade-alert-free-container-customers&quot;:true,&quot;js-component-alerts&quot;:false,&quot;plans-performance-overview&quot;:true,&quot;billing-zuora&quot;:null,&quot;upgrade-alert-paid-container-customers&quot;:true,&quot;plan-share-web-ui&quot;:true,&quot;open-pull-request&quot;:null,&quot;projects-page&quot;:null,&quot;github-student-pack&quot;:null,&quot;plan-usage-web-ui&quot;:true,&quot;import-env-vars&quot;:true,&quot;plans-performance-usage&quot;:true,&quot;audit&quot;:true,&quot;offer-linux-trial&quot;:null,&quot;setup-docs-ab-test&quot;:null,&quot;web-ui-job-detail-opt-in&quot;:true,&quot;insights-org-workflows-api&quot;:true,&quot;log-invalid-routes&quot;:false,&quot;plan-overview-web-ui&quot;:true,&quot;paid-usage-upgrade-banner&quot;:true,&quot;insights-direct-api-request-access&quot;:false,&quot;usage-credits&quot;:true,&quot;web-ui-auto-opt-in&quot;:true,&quot;enterprise-ui&quot;:null,&quot;job-page-rerun-workflow-from-failed&quot;:false}}" id="d250c367-5e54-4598-bc50-f34579896e97" /><script type="text/javascript">var launchDarkly = JSON.parse(document.getElementById('d250c367-5e54-4598-bc50-f34579896e97').content);</script><meta content="{&quot;accessToken&quot;:&quot;88e6275c49774d618916bfb4b4e13dfa&quot;,&quot;captureUncaught&quot;:true,&quot;captureUnhandledRejections&quot;:true,&quot;hostWhiteList&quot;:[&quot;dmmj3mmt94rvw.cloudfront.net&quot;,&quot;circleci.com&quot;],&quot;payload&quot;:{&quot;environment&quot;:&quot;production&quot;,&quot;client&quot;:{&quot;javascript&quot;:{&quot;code_version&quot;:&quot;3e3971eb5e8d270ec6e77c07b0a750a96324539a&quot;}}}}" id="a9647933-02f6-4461-98ac-5066e831718b" /><script type="text/javascript">var _rollbarConfig = JSON.parse(document.getElementById('a9647933-02f6-4461-98ac-5066e831718b').content);</script><script>!function(r){function o(n){if(e[n])return e[n].exports;var t=e[n]={exports:{},id:n,loaded:!1};return r[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var e={};return o.m=r,o.c=e,o.p="",o(0)}([function(r,o,e){"use strict";var n=e(1),t=e(4);_rollbarConfig=_rollbarConfig||{},_rollbarConfig.rollbarJsUrl=_rollbarConfig.rollbarJsUrl||"https://dmmj3mmt94rvw.cloudfront.net/assets/js/hosted/rollbar-4fcef5ccc29985d4878f2e7c5676180b.min.js",_rollbarConfig.async=void 0===_rollbarConfig.async||_rollbarConfig.async;var a=n.setupShim(window,_rollbarConfig),l=t(_rollbarConfig);window.rollbar=n.Rollbar,a.loadFull(window,document,!_rollbarConfig.async,_rollbarConfig,l)},function(r,o,e){"use strict";function n(r){return function(){try{return r.apply(this,arguments)}catch(r){try{console.error("[Rollbar]: Internal error",r)}catch(r){}}}}function t(r,o){this.options=r,this._rollbarOldOnError=null;var e=s++;this.shimId=function(){return e},window&&window._rollbarShims&&(window._rollbarShims[e]={handler:o,messages:[]})}function a(r,o){var e=o.globalAlias||"Rollbar";if("object"==typeof r[e])return r[e];r._rollbarShims={},r._rollbarWrappedError=null;var t=new p(o);return n(function(){o.captureUncaught&&(t._rollbarOldOnError=r.onerror,i.captureUncaughtExceptions(r,t,!0),i.wrapGlobals(r,t,!0)),o.captureUnhandledRejections&&i.captureUnhandledRejections(r,t,!0);var n=o.autoInstrument;return(void 0===n||n===!0||"object"==typeof n&&n.network)&&r.addEventListener&&(r.addEventListener("load",t.captureLoad.bind(t)),r.addEventListener("DOMContentLoaded",t.captureDomContentLoaded.bind(t))),r[e]=t,t})()}function l(r){return n(function(){var o=this,e=Array.prototype.slice.call(arguments,0),n={shim:o,method:r,args:e,ts:new Date};window._rollbarShims[this.shimId()].messages.push(n)})}var i=e(2),s=0,d=e(3),c=function(r,o){return new t(r,o)},p=d.bind(null,c);t.prototype.loadFull=function(r,o,e,t,a){var l=function(){var o;if(void 0===r._rollbarDidLoad){o=new Error("rollbar.js did not load");for(var e,n,t,l,i=0;e=r._rollbarShims[i++];)for(e=e.messages||[];n=e.shift();)for(t=n.args||[],i=0;i<t.length;++i)if(l=t[i],"function"==typeof l){l(o);break}}"function"==typeof a&&a(o)},i=!1,s=o.createElement("script"),d=o.getElementsByTagName("script")[0],c=d.parentNode;s.crossOrigin="",s.src=t.rollbarJsUrl,e||(s.async=!0),s.onload=s.onreadystatechange=n(function(){if(!(i||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){s.onload=s.onreadystatechange=null;try{c.removeChild(s)}catch(r){}i=!0,l()}}),c.insertBefore(s,d)},t.prototype.wrap=function(r,o,e){try{var n;if(n="function"==typeof o?o:function(){return o||{}},"function"!=typeof r)return r;if(r._isWrap)return r;if(!r._rollbar_wrapped&&(r._rollbar_wrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){var o=e;throw"string"==typeof o&&(o=new String(o)),o._rollbarContext=n()||{},o._rollbarContext._wrappedSource=r.toString(),window._rollbarWrappedError=o,o}},r._rollbar_wrapped._isWrap=!0,r.hasOwnProperty))for(var t in r)r.hasOwnProperty(t)&&(r._rollbar_wrapped[t]=r[t]);return r._rollbar_wrapped}catch(o){return r}};for(var u="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,captureDomContentLoaded,captureLoad".split(","),f=0;f<u.length;++f)t.prototype[u[f]]=l(u[f]);r.exports={setupShim:a,Rollbar:p}},function(r,o){"use strict";function e(r,o,e){if(r){var t;"function"==typeof o._rollbarOldOnError?t=o._rollbarOldOnError:r.onerror&&!r.onerror.belongsToShim&&(t=r.onerror,o._rollbarOldOnError=t);var a=function(){var e=Array.prototype.slice.call(arguments,0);n(r,o,t,e)};a.belongsToShim=e,r.onerror=a}}function n(r,o,e,n){r._rollbarWrappedError&&(n[4]||(n[4]=r._rollbarWrappedError),n[5]||(n[5]=r._rollbarWrappedError._rollbarContext),r._rollbarWrappedError=null),o.handleUncaughtException.apply(o,n),e&&e.apply(r,n)}function t(r,o,e){if(r){"function"==typeof r._rollbarURH&&r._rollbarURH.belongsToShim&&r.removeEventListener("unhandledrejection",r._rollbarURH);var n=function(r){var e=r.reason,n=r.promise,t=r.detail;!e&&t&&(e=t.reason,n=t.promise),o&&o.handleUnhandledRejection&&o.handleUnhandledRejection(e,n)};n.belongsToShim=e,r._rollbarURH=n,r.addEventListener("unhandledrejection",n)}}function a(r,o,e){if(r){var n,t,a="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<a.length;++n)t=a[n],r[t]&&r[t].prototype&&l(o,r[t].prototype,e)}}function l(r,o,e){if(o.hasOwnProperty&&o.hasOwnProperty("addEventListener")){for(var n=o.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var t=function(o,e,t){n.call(this,o,r.wrap(e),t)};t._rollbarOldAdd=n,t.belongsToShim=e,o.addEventListener=t;for(var a=o.removeEventListener;a._rollbarOldRemove&&a.belongsToShim;)a=a._rollbarOldRemove;var l=function(r,o,e){a.call(this,r,o&&o._rollbar_wrapped||o,e)};l._rollbarOldRemove=a,l.belongsToShim=e,o.removeEventListener=l}}r.exports={captureUncaughtExceptions:e,captureUnhandledRejections:t,wrapGlobals:a}},function(r,o){"use strict";function e(r,o){this.impl=r(o,this),this.options=o,n(e.prototype)}function n(r){for(var o=function(r){return function(){var o=Array.prototype.slice.call(arguments,0);if(this.impl[r])return this.impl[r].apply(this.impl,o)}},e="log,debug,info,warn,warning,error,critical,global,configure,handleUncaughtException,handleUnhandledRejection,_createItem,wrap,loadFull,shimId,captureDomContentLoaded,captureLoad".split(","),n=0;n<e.length;n++)r[e[n]]=o(e[n])}e.prototype._swapAndProcessMessages=function(r,o){this.impl=r(this.options);for(var e,n,t;e=o.shift();)n=e.method,t=e.args,this[n]&&"function"==typeof this[n]&&("captureDomContentLoaded"===n||"captureLoad"===n?this[n].apply(this,[t[0],e.ts]):this[n].apply(this,t));return this},r.exports=e},function(r,o){"use strict";r.exports=function(r){return function(o){if(!o&&!window._rollbarInitialized){r=r||{};for(var e,n,t=r.globalAlias||"Rollbar",a=window.rollbar,l=function(r){return new a(r)},i=0;e=window._rollbarShims[i++];)n||(n=e.handler),e.handler._swapAndProcessMessages(l,e.messages);window[t]=n,window._rollbarInitialized=!0}}}}]);
</script></head><noscript><h1>Hello there noscripter!</h1><p>CircleCI uses JavaScript pretty heavily to provide a good experience and to allow us to develop code a lot faster. We recognize that the tradeoff is that people using noscript get a worse experience, and we apologize for that.</p><p>So let us pitch you quickly on why you should enable JavaScript and view our site. CircleCI is <b>powerful, fast, and easy-to-use Continuous Integration and Deployment</b> for web applications.</p><p>CircleCI is easy to set up, incredibly fast, allows you to get your code to customers faster, and will even automatically parallelize your tests over many machines to get results to you faster. If that sounds useful, we'd encourage you to whitelist us in noscript and read about it yourself :)</p></noscript><body><div id="app"></div><script crossorigin="anonymous" src="https://dmmj3mmt94rvw.cloudfront.net/assets/js/frontend-production-5ab8a5e94b7618dc5c0e4a9a98e2afcb.js" type="text/javascript"></script>
<script id="ze-snippet" async src="https://static.zdassets.com/ekr/snippet.js?key=d6a46f2f-db01-4e4e-a20e-5c089096bfe3"> </script>

</body></html>

Description

I modified the failure output to also print the URL the curl attempted to use.

arjansingh commented 3 years ago

@felicianotech is there any chance we can get this reviewed this week please?