<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: EvolRed</title>
    <description>The latest articles on DEV Community by EvolRed (evolred).</description>
    <link>https://dev.to/evolred</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F16577%2F30e0d143-8f30-4a33-a274-f4777feddd8a.png</url>
      <title>DEV Community: EvolRed</title>
      <link>https://dev.to/evolred</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/evolred"/>
    <language>en</language>
    <item>
      <title>Writing Webhooks That Don't Ruin Your Weekend</title>
      <dc:creator>Luis Lerones</dc:creator>
      <pubDate>Wed, 02 Dec 2026 12:09:45 +0000</pubDate>
      <link>https://dev.to/evolred/writing-webhooks-that-dont-ruin-your-weekend-2ci7</link>
      <guid>https://dev.to/evolred/writing-webhooks-that-dont-ruin-your-weekend-2ci7</guid>
      <description>&lt;p&gt;Webhooks are deceptively simple. A sends a POST to B, B does something with it, done. This is what the tutorials look like. Then you put them in production and learn that the happy path was twenty percent of the work.&lt;/p&gt;

&lt;p&gt;The other eighty percent is the stuff that only shows up when something is actually depending on the webhook: retries, replays, ordering, authentication, and the class of failure modes that only manifest on a Saturday night.&lt;/p&gt;

&lt;p&gt;Here is what we have learned, having written webhook producers and consumers for enough systems to have strong opinions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Webhooks Fail. Design for That First.
&lt;/h2&gt;

&lt;p&gt;The single most important thing to understand about webhooks is that delivery is not guaranteed, even with the best-behaved producer. Networks drop requests. Your consumer will be down when the webhook fires. The producer's retry will happen at the wrong time. A TLS handshake will time out halfway through.&lt;/p&gt;

&lt;p&gt;Starting from "deliveries are best-effort and may arrive zero, one, or many times" changes how you design everything downstream. You need idempotent consumers. You need replay tooling. You need a way to reconcile state when webhooks are lost.&lt;/p&gt;

&lt;p&gt;If you cannot articulate what happens in your system when a webhook is delivered three times, you have a bug waiting to happen.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Idempotency Key Is Non-Negotiable
&lt;/h2&gt;

&lt;p&gt;Every webhook payload should carry a unique event ID, and your consumer should record which event IDs it has already processed.&lt;/p&gt;

&lt;p&gt;This sounds obvious and is routinely skipped. The typical shape we see: a consumer that processes every incoming webhook, creates a record in the database, and assumes the producer will not send the same event twice. Then the producer retries because the response was slow, and you get duplicates.&lt;/p&gt;

&lt;p&gt;The fix is one database column. When a webhook arrives, check the event ID against a &lt;code&gt;processed_events&lt;/code&gt; table. If it is there, return 200 and do nothing. If not, process it and insert the ID. Use a unique constraint so the insert fails rather than allowing a race condition.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.stripe.com/webhooks" rel="noopener noreferrer"&gt;Stripe's webhook documentation&lt;/a&gt; has been the reference for this pattern for years, and it is still the right approach. The specifics vary by provider, but the pattern does not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Signature Verification, Every Time
&lt;/h2&gt;

&lt;p&gt;Any webhook endpoint exposed to the internet should verify a signature on every request. Without this, anyone who learns your URL can send you arbitrary events.&lt;/p&gt;

&lt;p&gt;Most producers provide a signing mechanism — Stripe uses HMAC-SHA256 with a shared secret, GitHub uses a similar pattern, Slack uses a timestamp plus signature scheme. The details vary; the commitment is the same. Verify the signature, reject anything that fails, and treat the signing secret like any other secret.&lt;/p&gt;

&lt;p&gt;Two specific things to get right: verify against the raw request body, not the parsed JSON (many signatures are sensitive to formatting), and check the timestamp to reject replayed old events.&lt;/p&gt;

&lt;h2&gt;
  
  
  Respond Fast, Process Async
&lt;/h2&gt;

&lt;p&gt;The other source of webhook pain is slow consumers. The producer has a timeout — usually somewhere between 10 and 30 seconds — and will retry if your response does not arrive in time. This means that a webhook handler that does significant work synchronously is setting itself up for duplicate deliveries.&lt;/p&gt;

&lt;p&gt;The correct shape is: accept the webhook, record it, respond with 200 immediately, and process asynchronously. A queue, a background worker, whatever fits your stack.&lt;/p&gt;

&lt;p&gt;The consumer's job is to say "I got it" quickly. Everything else is downstream work that can take as long as it needs to, with its own retry logic, error handling, and observability.&lt;/p&gt;

&lt;p&gt;This also means that if the downstream work fails, that failure should not cause the webhook to be re-delivered. The event has already been acknowledged. The consumer's internal retry logic is responsible from there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build Replay Tooling Before You Need It
&lt;/h2&gt;

&lt;p&gt;The question "can we replay webhooks from the last 24 hours?" will be asked. It will be asked at 11pm on a Saturday, when something in your system has gone wrong and you need to catch up on missed state.&lt;/p&gt;

&lt;p&gt;You have two options. You can have thought about this in advance and have a tool that does it. Or you can not have thought about it, in which case you will be writing the tool at 11pm on a Saturday.&lt;/p&gt;

&lt;p&gt;The implementation depends on what you are integrating with. Some providers offer replay endpoints — &lt;a href="https://docs.stripe.com/webhooks#retries" rel="noopener noreferrer"&gt;Stripe&lt;/a&gt;, &lt;a href="https://docs.github.com/en/webhooks" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, and most mature webhook producers have some equivalent. For producers that do not, you need to persist everything you receive (with the idempotency key and signature intact) so you can reconstruct state from your own records.&lt;/p&gt;

&lt;p&gt;Either way: decide in advance how you would recover from a missed-webhooks incident, and build the minimum tooling to do so before it happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Ordering Problem
&lt;/h2&gt;

&lt;p&gt;Webhooks are not guaranteed to arrive in the order the events occurred. This surprises people regularly.&lt;/p&gt;

&lt;p&gt;The producer sends event A at 10:00:00 and event B at 10:00:01. A takes longer to deliver because of a network hiccup. Your consumer sees B first, then A. If your processing logic assumes order, you now have inconsistent state.&lt;/p&gt;

&lt;p&gt;The fix depends on what the events represent. If they carry enough information for your consumer to reconstruct the correct state regardless of order, order does not matter. If they are deltas — "add this thing", "remove this thing" — you need to handle them idempotently and reconcile.&lt;/p&gt;

&lt;p&gt;Where possible, prefer webhooks that carry the full current state rather than deltas, or at minimum carry a version or timestamp you can use to resolve out-of-order arrivals.&lt;/p&gt;

&lt;h2&gt;
  
  
  Observability Is Not Optional
&lt;/h2&gt;

&lt;p&gt;Every webhook should be logged on arrival with its event ID, its signature verification result, and its processing outcome. Every failure should alert you in a way you will actually see.&lt;/p&gt;

&lt;p&gt;The specific thing we check when reviewing webhook implementations: can you answer "how many webhooks did we receive in the last hour, and how many failed?" in under a minute? If no, the observability is not there yet.&lt;/p&gt;

&lt;p&gt;This matters more for webhooks than for most other system components because webhook failures are silent. There is no user on the other end refreshing the page. The only way you will know things are broken is if you are watching, which means you need to set up the watching before the breakage.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Producing Side
&lt;/h2&gt;

&lt;p&gt;We have mostly talked about consuming webhooks, but if you are producing them, the responsibilities mirror.&lt;/p&gt;

&lt;p&gt;Include a unique event ID on every event. Sign the payload. Retry on failure with exponential backoff. Do not retry forever — give up after some point and surface the failure. Provide a replay mechanism. Document your timeout, your retry schedule, and the order guarantees (or lack thereof) that consumers can rely on.&lt;/p&gt;

&lt;p&gt;Your consumers will thank you for any of this. All of it together is rare, and it is why webhook integrations with well-run providers feel so much less painful than integrations with poorly-run ones. The same principles apply when &lt;a href="https://evolred.com/blog/api-design?utm_source=devto" rel="noopener noreferrer"&gt;designing APIs more broadly&lt;/a&gt; — the parts consumers can see matter more than the parts you find clever.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;Most webhook implementations we see are fine until they are not, and when they are not, the failure is ugly. The gap between "works in the happy path" and "reliable in production" is not technically hard. It is just work that does not feel like progress when you are building the feature.&lt;/p&gt;

&lt;p&gt;Spending a day up front on idempotency, signature verification, async processing, and replay tooling is one of the highest-leverage things you can do on any webhook integration. Skipping it is the reliable route to weekend pager incidents.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;First published on the EvolRed blog. AI tools helped with drafting and editing.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>api</category>
      <category>backend</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Building Jira apps on Forge, part 1: your first app, and what broke on the way</title>
      <dc:creator>Luis Lerones</dc:creator>
      <pubDate>Tue, 01 Dec 2026 16:32:46 +0000</pubDate>
      <link>https://dev.to/evolred/building-jira-apps-on-forge-part-1-your-first-app-and-what-broke-on-the-way-5cjh</link>
      <guid>https://dev.to/evolred/building-jira-apps-on-forge-part-1-your-first-app-and-what-broke-on-the-way-5cjh</guid>
      <description>&lt;p&gt;This year I built a little over twenty Forge apps for Jira, and 14 of them are now live on the Atlassian Marketplace. Most of what I know about Forge I learned from something that passed every check and still didn't work.&lt;/p&gt;

&lt;p&gt;This series covers the parts the hello world skips. Part 1 starts at the very beginning: what a Forge app actually is, a small working app (a panel that counts a work item's links), and the five mistakes from my own apps I'd warn you about first.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Forge is, in one picture
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhfyf6nsyw08vaohzduqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhfyf6nsyw08vaohzduqq.png" alt="Diagram: the UI runs in the user's browser and calls a resolver with invoke(). The resolver runs on Atlassian's cloud and calls the Jira REST API as the user. manifest.yml declares the panel, the function and the scopes." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You don't run a server. Your UI runs inside Jira, your backend code (a "resolver") runs on Atlassian's cloud, and &lt;code&gt;manifest.yml&lt;/code&gt; ties it all together. The manifest also lists the &lt;strong&gt;scopes&lt;/strong&gt; your app needs, such as &lt;code&gt;read:jira-work&lt;/code&gt; to read work items.&lt;/p&gt;

&lt;p&gt;That last part matters more than it looks: adding a scope later turns the next release into a major version, and every site that installed your app has to approve it before they get it. I'll come back to that in mistake 5.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before you start
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Node.js 22 or 24.&lt;/strong&gt; The docs ask for 22.23.4+ or 24.22.1+.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The CLI:&lt;/strong&gt; &lt;code&gt;npm install -g @forge/cli&lt;/code&gt;, then &lt;code&gt;forge --version&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log in:&lt;/strong&gt; &lt;code&gt;forge login&lt;/code&gt; asks for your email and an API token. Create the token at id.atlassian.com ÔåÆ Security ÔåÆ API tokens, choosing "Create API token with scopes" and &lt;strong&gt;Forge&lt;/strong&gt; as the app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Jira site to test on.&lt;/strong&gt; &lt;code&gt;forge install --demo-site&lt;/code&gt; gives you one (it lasts 90 days), or create a free developer site at go.atlassian.com/cloud-dev.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The app: a panel that counts links
&lt;/h2&gt;

&lt;p&gt;On a big work item it's hard to see at a glance what it blocks and what blocks it. So the panel lists the links by type: "2 ┬À is blocked by", "1 ┬À relates to".&lt;/p&gt;

&lt;p&gt;Start from the official template. The name you give becomes the folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;forge create link-count --template jira-issue-panel-ui-kit
&lt;span class="nb"&gt;cd&lt;/span&gt; link-count
npm install @forge/api
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first time, &lt;code&gt;forge create&lt;/code&gt; asks which developer space the app belongs to and asks you to accept the developer terms. The template doesn't include &lt;code&gt;@forge/api&lt;/code&gt;, which the backend below needs, hence the last line.&lt;/p&gt;

&lt;h3&gt;
  
  
  The manifest
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;modules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;jira:issuePanel&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;link-count-panel&lt;/span&gt;
      &lt;span class="na"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;
      &lt;span class="na"&gt;resolver&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;resolver&lt;/span&gt;
      &lt;span class="na"&gt;render&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;native&lt;/span&gt;
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Link count&lt;/span&gt;
      &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://developer.atlassian.com/platform/forge/images/icons/issue-panel-icon.svg&lt;/span&gt;
  &lt;span class="na"&gt;function&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;resolver&lt;/span&gt;
      &lt;span class="na"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;index.handler&lt;/span&gt;
&lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;main&lt;/span&gt;
    &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;src/frontend/index.jsx&lt;/span&gt;
&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;scopes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;read:jira-work&lt;/span&gt;
&lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;runtime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;nodejs24.x&lt;/span&gt;
    &lt;span class="na"&gt;memoryMB&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;256&lt;/span&gt;
    &lt;span class="na"&gt;architecture&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;arm64&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;your app id&amp;gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;render: native&lt;/code&gt; means UI Kit: you write React with Atlassian's components and Jira draws them. Compared with the template, I renamed the key and title and added the &lt;code&gt;permissions&lt;/code&gt; block. Without &lt;code&gt;read:jira-work&lt;/code&gt;, the call in the next step fails.&lt;/p&gt;

&lt;h3&gt;
  
  
  The resolver (backend)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/resolvers/index.js&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Resolver&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/resolver'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;route&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/api'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;resolver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Resolver&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;resolver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;define&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'getLinkCounts'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;issueKey&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;extension&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;requestJira&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="sb"&gt;`/rest/api/3/issue/${issueKey}?fields=issuelinks`&lt;/span&gt;
  &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="c1"&gt;// A failed read must not look like "no links"&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`Jira returned ${res.status}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;links&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;issuelinks&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="c1"&gt;// Count by the wording Jira shows: "blocks", "is blocked by"...&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;counts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;links&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outwardIssue&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;outward&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;link&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;inward&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;links&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;counts&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resolver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDefinitions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three things here I'd keep in every app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;asUser()&lt;/code&gt;&lt;/strong&gt;: the call runs with the permissions of the person looking at the page, so the app can't show them something they couldn't open themselves.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;route&lt;/code&gt;&lt;/strong&gt;: the tagged template escapes the issue key for you. Pass a plain string instead and &lt;code&gt;@forge/api&lt;/code&gt; throws: "You must create your route using the 'route' export".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;if (!res.ok) throw&lt;/code&gt;&lt;/strong&gt;: if this line is missing, a 403 looks exactly like "this work item has no links". Silent zeros are the worst kind of bug, because nobody reports them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The UI (frontend)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/frontend/index.jsx&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;ForgeReconciler&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;Inline&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Lozenge&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;SectionMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Spinner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Stack&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/react'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;invoke&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/bridge'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nc"&gt;App&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'getLinkCounts'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;setData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SectionMessage&lt;/span&gt; &lt;span class="n"&gt;appearance&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"error"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Text&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nc"&gt;Couldn&lt;/span&gt;&lt;span class="s1"&gt;'t read the links: {error}&amp;lt;/Text&amp;gt;
      &amp;lt;/SectionMessage&amp;gt;
    );
  }
  if (!data) return &amp;lt;Spinner label="Loading links" /&amp;gt;;
  if (data.total === 0) return &amp;lt;Text&amp;gt;No linked work items yet.&amp;lt;/Text&amp;gt;;

  return (
    &amp;lt;Stack space="space.100"&amp;gt;
      &amp;lt;Text&amp;gt;{data.total} linked work items&amp;lt;/Text&amp;gt;
      {Object.entries(data.counts).map(([label, n]) =&amp;gt; (
        &amp;lt;Inline key={label} space="space.100" alignBlock="center"&amp;gt;
          &amp;lt;Lozenge&amp;gt;{n}&amp;lt;/Lozenge&amp;gt;
          &amp;lt;Text&amp;gt;{label}&amp;lt;/Text&amp;gt;
        &amp;lt;/Inline&amp;gt;
      ))}
    &amp;lt;/Stack&amp;gt;
  );
};

ForgeReconciler.render(
  &amp;lt;React.StrictMode&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/React.StrictMode&amp;gt;
);
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;invoke('getLinkCounts')&lt;/code&gt; is the bridge between the two halves. Give every panel three states besides the happy one: loading, error and empty. A blank panel makes people think the app is broken, and they're right.&lt;/p&gt;

&lt;p&gt;One detail on the error state: the message that reaches the UI isn't exactly the one you threw. Forge wraps it, so a 403 shows as "There was an error invoking the function - Jira returned 403". Fine for a demo; in a real app, map it to a sentence a user understands.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;forge deploy
forge install      &lt;span class="c"&gt;# pick Jira and your site&lt;/span&gt;
forge tunnel       &lt;span class="c"&gt;# now edit, save, refresh the Jira page&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open any work item and look for the app under &lt;em&gt;View app actions&lt;/em&gt;. In a service project it's a button in the action bar instead.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsb4jyxs1wniiv2uwcblw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsb4jyxs1wniiv2uwcblw.png" alt="The demo panel on a test work item: 5 linked work items, 2 is blocked by, 2 relates to, 1 duplicates." width="799" height="128"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The commands confused me at first, so here's the table I wish I'd had:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqan80pvren8o7gfilgj2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqan80pvren8o7gfilgj2.png" alt="Table: first time, forge create then deploy then install. Editing code, forge tunnel and refresh the page. New module in the manifest, forge deploy. New scope, forge deploy then forge install --upgrade; a major version that each site's admin must approve." width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;forge tunnel&lt;/code&gt; runs your code from your machine, so you only refresh the page. When you stop tunnelling, run &lt;code&gt;forge deploy&lt;/code&gt; again, or the site keeps the last deployed version.&lt;/p&gt;

&lt;p&gt;This is roughly where my own link counter started. The version on the Marketplace today groups links by type and shows each linked item's status, but the core is the same call you just wrote:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu7rrvswr04e6vt3r6c3m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu7rrvswr04e6vt3r6c3m.png" alt="The production version of the link panel: 5 links across 3 types, grouped as Blocks, Relates and Duplicate, each with the linked item's key, summary and status." width="527" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Five things that broke for me
&lt;/h2&gt;

&lt;p&gt;All of these are real, from my own apps, and none of them was caught by the linter, TypeScript or my unit tests.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A made-up event name lints clean and never fires
&lt;/h3&gt;

&lt;p&gt;I wrote scheduled jobs with triggers like &lt;code&gt;avi:forge:scheduled:hourly&lt;/code&gt;, and a sprint trigger on &lt;code&gt;avi:jira:sprint:completed&lt;/code&gt;. &lt;code&gt;forge lint&lt;/code&gt; accepted them (I checked again while writing this: CLI 15.1 still says "No issues found"). They don't exist. Three apps had schedules that never ran, and a fourth app's sprint report never started.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; schedules are &lt;code&gt;scheduledTrigger&lt;/code&gt; modules with &lt;code&gt;interval: fiveMinute | hour | day | week&lt;/code&gt;. Check every event name against the Forge events reference by hand, because nothing else will.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. &lt;code&gt;requestJira&lt;/code&gt; imported on its own is not logged in
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;requestJira&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/api'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// every call: 401&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@forge/api'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;asApp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;requestJira&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                &lt;span class="c1"&gt;// or api.asUser()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The bare import isn't authenticated, so every call returned 401 "Client must be authenticated". In my licence-audit app the scan "worked" and reported zero users, because I didn't check &lt;code&gt;res.ok&lt;/code&gt;. That's why the resolver above throws.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. A resolver's &lt;code&gt;null&lt;/code&gt; arrives as &lt;code&gt;{}&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;A resolver that returns &lt;code&gt;null&lt;/code&gt; reaches the browser as an empty object. So does one that returns nothing. I first hit this in Custom UI (your own React app in an iframe), and while testing this article I found UI Kit does exactly the same. &lt;code&gt;if (result)&lt;/code&gt; is true, the next line reads &lt;code&gt;result.config.something&lt;/code&gt;, and the panel crashes into its error state. The resolver succeeded, so &lt;code&gt;forge logs&lt;/code&gt; shows nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; return a wrapper (&lt;code&gt;{ config: null }&lt;/code&gt;) or check the shape before using it.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;code&gt;window.confirm()&lt;/code&gt; does nothing
&lt;/h3&gt;

&lt;p&gt;The app's frame is sandboxed without modals. &lt;code&gt;confirm()&lt;/code&gt; returns &lt;code&gt;false&lt;/code&gt; straight away, so the code after "Are you sure?" never runs. In one of my apps, deleting a policy had never worked. Nobody had told me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; ask inside the page: an inline "Delete? Yes / No" next to the button.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. A new scope is a bigger release than it looks
&lt;/h3&gt;

&lt;p&gt;Adding a scope changes the app's permissions, so &lt;code&gt;forge deploy&lt;/code&gt; treats it as a major version. It stops with &lt;code&gt;MAJOR_VERSION_RULE&lt;/code&gt; until you run &lt;code&gt;forge deploy --approve MAJOR_VERSION_RULE&lt;/code&gt;, and then you run &lt;code&gt;forge install --upgrade&lt;/code&gt; on your own sites. Sites that already installed your app keep the old version until their admin approves the new permissions. On a live app, some sites take a long time to do that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; think about scopes up front. My own rule for routine releases now: no new scopes and no new egress, ever. If a feature needs one, it waits for a planned major release.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next in the series
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your first app&lt;/strong&gt; (this one)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The UI-to-resolver contract:&lt;/strong&gt; &lt;code&gt;invoke&lt;/code&gt; names and payloads nothing checks, UI Kit vs Custom UI, and how I test both halves&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Calling Jira properly:&lt;/strong&gt; &lt;code&gt;asUser&lt;/code&gt; vs &lt;code&gt;asApp&lt;/code&gt;, pagination, and why team-managed boards vanish from "scrum boards"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage and scheduled jobs:&lt;/strong&gt; KVS surprises, capping data, and personal data reporting&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shipping it:&lt;/strong&gt; environments, major vs minor versions, licences and trials, and my release checklist&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moving from Connect to Forge&lt;/strong&gt; before Connect support ends on 31 January 2027&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If something here is wrong or out of date, tell me in the comments. Forge changes often, and I'd rather fix the article than have you lose an afternoon.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;How I wrote this: I used an AI assistant to help structure and edit the draft and to draw the diagrams. The code, the mistakes and the fixes come from my own apps, and I checked the commands against the Forge docs on 30 November 2026. On 1 December I ran every code sample in this article in a test app on a real Jira site.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>atlassian</category>
      <category>jira</category>
      <category>javascript</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
