<?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: moath othman</title>
    <description>The latest articles on DEV Community by moath othman (@moathothman).</description>
    <link>https://dev.to/moathothman</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%2Fuser%2Fprofile_image%2F4241425%2F8daa8489-143a-4f22-92f6-02e034633531.png</url>
      <title>DEV Community: moath othman</title>
      <link>https://dev.to/moathothman</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/moathothman"/>
    <language>en</language>
    <item>
      <title>A green CI job can still capture zero API requests</title>
      <dc:creator>moath othman</dc:creator>
      <pubDate>Fri, 04 Dec 2026 23:05:16 +0000</pubDate>
      <link>https://dev.to/moathothman/a-green-ci-job-can-still-capture-zero-api-requests-5fdg</link>
      <guid>https://dev.to/moathothman/a-green-ci-job-can-still-capture-zero-api-requests-5fdg</guid>
      <description>&lt;p&gt;&lt;em&gt;Drafted with AI assistance. The example uses synthetic test data.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A proxy-based API check has a blind spot: a test runner can exit successfully even if its requests never went through the proxy. A client might ignore proxy environment variables, or an entry in NO_PROXY might bypass the host under test. If zero observed failures counts as success, a broken test setup looks healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a positive control
&lt;/h2&gt;

&lt;p&gt;Pick a harmless endpoint in a staging environment you control. Call it using the &lt;strong&gt;same HTTP client and configuration&lt;/strong&gt; as the test suite. Verify that the expected method, host and path appear in the current capture. A successful curl command only tells you that curl is configured correctly.&lt;/p&gt;

&lt;p&gt;Deliberately disable proxy routing for that client and check that your gate notices the missing traffic. Then restore routing and verify a known-good request. For HTTPS, configure the runner to trust your capture CA using its supported trust settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make missing evidence visible
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pass:&lt;/strong&gt; The gate evaluated the selected traffic and found no failures.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fail:&lt;/strong&gt; A captured response failed a check you selected.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inconclusive:&lt;/strong&gt; No traffic was observed, or the check had insufficient evidence.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the reporting request itself fails, surface that as a tooling error. It helps whoever is on call distinguish a failed API check from a failed reporting service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Apply it to your capture
&lt;/h2&gt;

&lt;p&gt;Proxycept’s CI verdict can check captured responses for server errors, response contract violations, and a p95 latency threshold. Start with the 5xx rule so you can verify the plumbing first.&lt;/p&gt;

&lt;p&gt;Use a dedicated test profile. Record the newest flow before tests run and request a verdict for flows after that boundary. Give concurrent jobs separate profiles so one job cannot satisfy another job’s traffic check. If there is no capture session at all, report that as inconclusive in the wrapper.&lt;/p&gt;

&lt;p&gt;After you fetch a verdict into a shell variable, handle the outcomes explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;outcome&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nv"&gt;$(&lt;/span&gt;jq -er &lt;span class="s1"&gt;'.result'&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s2"&gt;"$verdict"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 3
&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s2"&gt;"$outcome"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
  pass&lt;span class="o"&gt;)&lt;/span&gt;         &lt;span class="nb"&gt;exit&lt;/span&gt; 0 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  fail&lt;span class="o"&gt;)&lt;/span&gt;         &lt;span class="nb"&gt;exit&lt;/span&gt; 1 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  inconclusive&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;exit&lt;/span&gt; 2 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  *&lt;span class="o"&gt;)&lt;/span&gt;            &lt;span class="nb"&gt;exit&lt;/span&gt; 3 &lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;esac&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keep the original test runner’s exit code if the tests themselves fail. For an enforced gate, make inconclusive nonzero so that no captured evidence can’t silently pass the build.&lt;/p&gt;

&lt;p&gt;Try three runs before enforcing the gate: a good staging response, a deliberate 5xx from the test fixture, and a run with routing disabled. Read the evidence from each run.&lt;/p&gt;

&lt;p&gt;I’m the founder of Proxycept. The &lt;a href="https://proxycept.com/guides/fail-ci-build-when-api-breaks?utm_source=devto&amp;amp;utm_medium=referral&amp;amp;utm_campaign=qa_evidence_dec&amp;amp;utm_content=missing_capture" rel="noopener noreferrer"&gt;CI verdict guide&lt;/a&gt; has the full wrapper and optional JUnit output.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>debugging</category>
      <category>devops</category>
      <category>testing</category>
    </item>
    <item>
      <title>The request says 200. The app says "Something went wrong."</title>
      <dc:creator>moath othman</dc:creator>
      <pubDate>Sat, 21 Nov 2026 12:56:55 +0000</pubDate>
      <link>https://dev.to/moathothman/the-request-says-200-the-app-says-something-went-wrong-3lng</link>
      <guid>https://dev.to/moathothman/the-request-says-200-the-app-says-something-went-wrong-3lng</guid>
      <description>&lt;p&gt;A QA tester is on a real Android phone. They tap &lt;strong&gt;Pay&lt;/strong&gt;, wait a second, and get a toast: "Something went wrong. Please try again."&lt;/p&gt;

&lt;p&gt;They do the right thing and open the request list. The checkout call is there. Status 200, response body looks fine, latency is normal. As far as the network is concerned, nothing went wrong.&lt;/p&gt;

&lt;p&gt;So the bug goes to a developer with a screenshot of a toast and a screenshot of a 200, and the developer does what we all do: tries it on their own phone, on their own build, and it works.&lt;/p&gt;

&lt;p&gt;The answer was on the tester's phone the whole time. Somewhere in the app, a line like "checkout: couldn't map the order response, the total field was missing" was written to the device log, a few milliseconds after that 200 arrived. Nobody connected to that phone with a cable, so nobody saw it.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/mzoXYML-GCI" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The short version, as a video.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Two halves of one bug
&lt;/h3&gt;

&lt;p&gt;When a screen breaks, you need two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;What went over the network.&lt;/strong&gt; The request, the response, the status, the timing. A debugging proxy gives you this, from any device you point at it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What the app did with it.&lt;/strong&gt; Which branch it took, what it failed to parse, what it decided to show. That lives in your app's own logs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The trouble is where the second half lives. On a phone it's in the system log, which you only see with a cable and the right tool open at the right moment. In a crash reporter, it only exists if the app crashed, and a toast isn't a crash. And in either place, it isn't attached to the request that caused it, so you are matching timestamps across two tools by eye.&lt;/p&gt;

&lt;h3&gt;
  
  
  What App Logs adds
&lt;/h3&gt;

&lt;p&gt;Proxycept is a hosted debugging proxy for testing your own apps: QA phones, simulators, teammates and CI point at one endpoint and the captures land in one shared console. App Logs is the second half. Your app's own code sends the log lines you choose, from your QA and dev builds, into that same console, next to its traffic.&lt;/p&gt;

&lt;p&gt;To be precise about what it is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It's the lines your code sends, and nothing else.&lt;/strong&gt; The SDK doesn't read the system log, doesn't report crashes and doesn't record sessions. If your code doesn't log it, it isn't there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sending logs doesn't need the proxy.&lt;/strong&gt; The SDK uploads over HTTPS on its own, so you don't need proxy settings or a CA certificate on the phone just to see logs. You need the proxy for the traffic half, and to connect the two.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDKs:&lt;/strong&gt; Swift for iOS and Kotlin for Android, added to your project from source (there's no package-registry release yet). React Native, Flutter and Kotlin Multiplatform are available as source previews. The &lt;a href="https://proxycept.com/guides/app-logs-quickstart?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=app-logs" rel="noopener noreferrer"&gt;quickstart guide&lt;/a&gt; has the setup for each, and the compatibility details.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The workflow, start to finish
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. Register the app.&lt;/strong&gt; In the console, App Logs lives under &lt;strong&gt;Understand&lt;/strong&gt;. Add an application, open &lt;strong&gt;Setup &amp;amp; keys&lt;/strong&gt;, and create an ingestion key. The key can only send logs: it can't read anything, it expires after 30 days, and you can revoke it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Log at the decisions, not everywhere.&lt;/strong&gt; The lines that pay off are the ones at the points where the app chooses what to do: a response it couldn't map, a fallback it took, a state it didn't expect. Give each one a severity and a category ("checkout", "auth", "sync") so you can filter later.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Watch it live.&lt;/strong&gt; Open the app on the phone and the events appear in the console. You can search messages and filter by severity, category, app version, debug session and installation, which is what makes "only this tester's phone, only this build" a two-click question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Connect a log line to its request.&lt;/strong&gt; This is the part that closes the gap, and there are two ways to do it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Exact match.&lt;/strong&gt; The app logs an event with a request ID and sends the same ID in a header on that request. If your API already returns its own request ID, you can tell Proxycept to read that header instead, from the request or the response. Open the captured request, and its detail view lists the log events that carry that ID, labelled with which header matched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Related, by session.&lt;/strong&gt; Link a debug session from the app to a capture session in the console. The capture's &lt;strong&gt;App logs&lt;/strong&gt; timeline then shows those events too, labelled "Related (linked session)" rather than "Exact request marker". Related means they happened in the same test run. It doesn't prove one caused the other, and the console doesn't pretend it does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Back to the checkout bug. The tester opens the checkout request in the capture, and right under the 200 is the warning the app logged about the missing total field. The developer doesn't need the phone, the cable or the repro. The response body and the line explaining what the app made of it are on one screen, and the whole team sees the same thing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shared, because the bug isn't yours alone
&lt;/h3&gt;

&lt;p&gt;The logs live in the workspace, not on a device. A developer, a QA engineer and a lead can look at the same request and the same log lines from their own machines. On team plans, viewers can read logs, and only editors can create apps and keys.&lt;/p&gt;

&lt;h3&gt;
  
  
  Privacy and limits
&lt;/h3&gt;

&lt;p&gt;This is for testing your own apps on your team's devices, so treat it that way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Use it in QA and dev builds.&lt;/strong&gt; Don't ship a permanent ingestion key in your production app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't log what you wouldn't paste into a ticket.&lt;/strong&gt; Secrets and card-number patterns are redacted on the device and again on the server, but that's best effort. Keep personal data out of the message in the first place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Short retention.&lt;/strong&gt; Events are kept for three days, then deleted, and they aren't included in database backups.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared capture links don't include app logs.&lt;/strong&gt; A read-only link to a capture shows the traffic, not the logs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attaching logs to a support report is opt-in.&lt;/strong&gt; If you ever ask us for help, there's an unticked consent box, and at most 25 sanitized events go with it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;If a build leaves your team,&lt;/strong&gt; for example to outside beta testers, tell them it sends diagnostic logs and get their consent first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the limits worth knowing up front: delivery is queued and retried, not instant, and a log call that hasn't been flushed when the app is killed may not arrive. The exact link only works for requests that pass through a capture profile. And App Logs is a paid feature: network capture is on the free plan, App Logs needs Solo ($12/month) or a team plan.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Read the &lt;a href="https://proxycept.com/guides/app-logs-quickstart?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=app-logs" rel="noopener noreferrer"&gt;App Logs quickstart&lt;/a&gt; and pick your SDK.&lt;/li&gt;
&lt;li&gt;Add one log line at the place your app maps a response, and run it on a QA build.&lt;/li&gt;
&lt;li&gt;Point the same phone at a capture profile, make the request, and open it. The log line should be sitting next to it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://proxycept.com?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=app-logs" rel="noopener noreferrer"&gt;Start at proxycept.com&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: I build Proxycept, so weigh the framing accordingly. If the quickstart trips you up somewhere this post didn't warn you about, tell me in the comments. I'd rather fix the guide than have you work around it.&lt;/p&gt;

</description>
      <category>mobile</category>
      <category>debugging</category>
      <category>testing</category>
      <category>ios</category>
    </item>
    <item>
      <title>Backend not ready? Mock it at the proxy, from the OpenAPI spec you already have</title>
      <dc:creator>moath othman</dc:creator>
      <pubDate>Fri, 13 Nov 2026 12:56:43 +0000</pubDate>
      <link>https://dev.to/moathothman/backend-not-ready-mock-it-at-the-proxy-from-the-openapi-spec-you-already-have-35ef</link>
      <guid>https://dev.to/moathothman/backend-not-ready-mock-it-at-the-proxy-from-the-openapi-spec-you-already-have-35ef</guid>
      <description>&lt;p&gt;The screen is designed, the client code is written, and the endpoint it needs ships "next sprint". Every frontend and mobile developer knows this week. Here are three ways to stop waiting, when each one is the right call, and the edge cases you should be mocking anyway, even after the real API exists.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: mock inside the app
&lt;/h2&gt;

&lt;p&gt;Fixtures, a fake HTTP client, or a request-interception library such as MSW for web and Node.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good for:&lt;/strong&gt; unit and component tests, fast feedback, no network at all.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weak at:&lt;/strong&gt; anything outside the test runner. A tester on a real device gets the real (missing) endpoint, and the mock code is one more thing that drifts from the spec.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: run a standalone mock server
&lt;/h2&gt;

&lt;p&gt;Point a mock server such as Stoplight Prism at your spec and switch the app's base URL to it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good for:&lt;/strong&gt; a whole API that does not exist yet, contract-first teams, local development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weak at:&lt;/strong&gt; mixing. It mocks everything, so the endpoints that already work in staging are mocked too, and the app needs a different base URL (which means a different build or config) to use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: mock at the proxy
&lt;/h2&gt;

&lt;p&gt;Route the app through a debugging proxy that answers only the endpoints that are missing and passes everything else to the real backend. The app keeps its real URLs, so nothing changes in the code when the endpoint ships: you delete the mock.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good for:&lt;/strong&gt; one or two missing endpoints in an otherwise real API, manual testing on real devices, and QA testing against the same mocks as the developers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Weak at:&lt;/strong&gt; the usual proxy setup. The device has to use the proxy and trust its CA.&lt;/p&gt;

&lt;h2&gt;
  
  
  The edge cases worth mocking even when the API exists
&lt;/h2&gt;

&lt;p&gt;A mock that only returns the happy path is half a mock. For every list or detail endpoint, try:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Response&lt;/th&gt;
&lt;th&gt;What it tells you&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Empty list &lt;code&gt;[]&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Is there an empty state, or a blank screen?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;401&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Does the app refresh the token or log the user out cleanly?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;404&lt;/code&gt; on a detail route&lt;/td&gt;
&lt;td&gt;Does a deleted item crash the screen?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;500&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Is there an error state with a way to retry?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A 3 second delay&lt;/td&gt;
&lt;td&gt;Is there a loading state, and can the user leave?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Malformed JSON&lt;/td&gt;
&lt;td&gt;Does the parser failure crash the app or get handled?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The backend will almost never produce these on demand. A mock produces them in seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shared version
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/CHmtHyFOcU4" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(17-second animated explainer, not a screen recording.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: I build Proxycept, a hosted debugging proxy, and option 3 is what it does for mocks. You upload an OpenAPI 3 spec or a Postman collection and get a mock route per operation; response bodies come from the spec's examples, or from placeholders built from the schema when there are none. Then you edit a route to return what you need: an empty list, a 401, a 500, or a delay. Anything you have not mocked goes to the real backend, unless you turn on catch mode, which blocks everything that is not mocked (handy for proving a demo or a test run has no hidden live dependency).&lt;/p&gt;

&lt;p&gt;Because the proxy is hosted, the phone on a tester's desk, the emulator on your laptop and a CI runner all hit the same mocks through one endpoint. When something looks wrong, you can share the capture as a read-only link instead of a screenshot.&lt;/p&gt;

&lt;p&gt;The limits: each device still has to trust the proxy's CA (manual on Android, like with any proxy), it does not get past certificate pinning, and it is for testing your own apps. If everything you test runs in one browser, option 1 is probably enough.&lt;/p&gt;

&lt;p&gt;Free plan to start, sign in with Google, GitHub or email: &lt;a href="https://proxycept.com/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=community-2026-11&amp;amp;utm_content=d2-mock-openapi" rel="noopener noreferrer"&gt;proxycept.com&lt;/a&gt;. Related, if you want to capture real responses and replay them later: &lt;a href="https://proxycept.com/guides/record-and-replay-http?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=community-2026-11&amp;amp;utm_content=d2-mock-openapi-guide" rel="noopener noreferrer"&gt;record and replay HTTP requests&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Which option does your team use, and what made you pick it? I'd like to hear it in the comments.&lt;/p&gt;

</description>
      <category>api</category>
      <category>openapi</category>
      <category>mobile</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Your error handling has never met a real 503. Here's how to introduce them.</title>
      <dc:creator>moath othman</dc:creator>
      <pubDate>Thu, 12 Nov 2026 20:12:31 +0000</pubDate>
      <link>https://dev.to/moathothman/your-error-handling-has-never-met-a-real-503-heres-how-to-introduce-them-41op</link>
      <guid>https://dev.to/moathothman/your-error-handling-has-never-met-a-real-503-heres-how-to-introduce-them-41op</guid>
      <description>&lt;p&gt;Staging is a terrible place to test failure. It only ever produces the happy path, so the code that handles timeouts, 500s and retries is the least-executed code in most apps, right up until production executes it for you.&lt;/p&gt;

&lt;p&gt;This post is a practical way to fix that without changing the backend or the app: make the failures happen at the proxy, between the two.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three kinds of failure worth testing
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Slow.&lt;/strong&gt; The request succeeds, eventually. What does the UI show at 200 ms, at 3 seconds, at 30? Is there a spinner, a timeout, a way out? Does the user tap the button twice?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Broken.&lt;/strong&gt; 500, 502, 503, a dropped connection. Does the app retry, and how often? Does it honour &lt;code&gt;Retry-After&lt;/code&gt;? On a checkout, does a retry charge the card twice?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wrong.&lt;/strong&gt; The one people skip. An HTTP 200 with bad data inside: a price that arrives as &lt;code&gt;"49.00"&lt;/code&gt; instead of &lt;code&gt;49.00&lt;/code&gt;, a field that is suddenly &lt;code&gt;null&lt;/code&gt;, an empty list on a screen that always had one item. These break more UIs than 5xx errors do, and no backend will produce them on demand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the proxy is the right place
&lt;/h2&gt;

&lt;p&gt;You could fake these in the app (a mock HTTP client, test fixtures) or in the backend (a broken build on staging). The proxy layer beats both for this job:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It needs no code change on either side, so you are testing the build you will ship.&lt;/li&gt;
&lt;li&gt;It works for manual, exploratory testing on a real phone, where there is no test harness at all.&lt;/li&gt;
&lt;li&gt;The same setup applies to the app, the automation suite and CI.&lt;/li&gt;
&lt;li&gt;You can target one host and one path, and leave everything else alone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The trade-off is the usual proxy setup: the device or runner sends its traffic through the proxy, and trusts the proxy's CA so HTTPS can be decrypted. That is the same for every tool in this post, and it is the part worth doing once, carefully.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to look for when it fails
&lt;/h2&gt;

&lt;p&gt;A checklist that has found real bugs for me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does a slow request ever give the user a way out, or is it a spinner forever?&lt;/li&gt;
&lt;li&gt;After a 503, does Retry respect &lt;code&gt;Retry-After&lt;/code&gt;, or hammer the server?&lt;/li&gt;
&lt;li&gt;On payment or order endpoints, can a retry create a duplicate?&lt;/li&gt;
&lt;li&gt;Does the error message make sense to a user, or does it print &lt;code&gt;payment_unavailable&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;When a number arrives as a string, does the screen crash, show &lt;code&gt;NaN&lt;/code&gt;, or quietly do maths on text?&lt;/li&gt;
&lt;li&gt;After the failure clears, does the app recover without a restart?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When the proxy has to be shared
&lt;/h2&gt;

&lt;p&gt;Everything above runs on one laptop, which is fine until the failure you care about happens on a device in the lab, on a teammate's phone, or in a CI run. Then the proxy has to be somewhere everything can reach.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/6mXTCFwYVRU" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(15-second animated explainer, not a screen recording.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Disclosure: that is the problem I build Proxycept for. It is a hosted debugging proxy: phones, emulators, teammates and CI runners point at one authenticated endpoint, and captures land in one shared web console. In it you can hold a request and change its response before releasing it, set delays and error rates per profile or per route, and add response rewrite rules that change one field of a real response (keeping its JSON type, or deliberately changing it) while the backend still answers for real.&lt;/p&gt;

&lt;p&gt;What it does not do: it does not get past certificate pinning, it does not remove the CA step on each device (on Android that step is manual, like with any proxy), and it is for testing your own apps. If you work alone on one machine, a desktop proxy like Charles, Proxyman or mitmproxy is all you need.&lt;/p&gt;

&lt;p&gt;If the shared version sounds useful, there is a free plan, and you can sign in with Google, GitHub or email: &lt;a href="https://proxycept.com/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=community-2026-11&amp;amp;utm_content=d1-failure-paths" rel="noopener noreferrer"&gt;proxycept.com&lt;/a&gt;. If you are comparing it with Charles, &lt;a href="https://proxycept.com/guides/proxycept-vs-charles?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=community-2026-11&amp;amp;utm_content=d1-failure-paths-vs" rel="noopener noreferrer"&gt;this page&lt;/a&gt; covers when each one fits.&lt;/p&gt;

&lt;p&gt;Have a failure case I missed, or a bug story like these? I'd like to hear it in the comments.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>mobile</category>
      <category>api</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
