Skip to content

fix(pricing): update pricing API endpoint and guard non-OK responses - #2283

Merged
pedro-ribeiro-azion merged 1 commit into
aziontech:mainfrom
souzavinny:fix/pricing-api-endpoint
Jul 23, 2026
Merged

fix(pricing): update pricing API endpoint and guard non-OK responses#2283
pedro-ribeiro-azion merged 1 commit into
aziontech:mainfrom
souzavinny:fix/pricing-api-endpoint

Conversation

@souzavinny

Copy link
Copy Markdown
Contributor

Brief

Production builds were failing on the pricing pages: the API at www.azion.com/api/pricing now returns an HTML 404 page instead of JSON, crashing TablePricing.astro at build time. Fixed by reverting the component at the working endpoint from previous state and adding a response.ok guard so future API failures produce a clear build error.

Activities

  • Traced the build error to fetchPricingData() in src/components/Table/TablePricing.astro and confirmed the new endpoint returns HTML 404 for every product slug.
  • Swapped the fetch URL to https://vef4esszhdq.map.azionedge.net/api/pricing/get/product_slug/<slug> (Verified on the commit history at Fix/empty table loading #2060) and added a response.ok guard.

Evidences

  • Reverted endpoint returns HTTP 200 JSON for all 15 product slugs; all 28 product_slug/metric_slug pairs used in the EN/PT-BR pages have matching data. All prices there are the same as the one currently live.
  • Both pricing pages rendered successfully via dev server with populated tables and correct currency/i18n formatting.

Before:
image

After:
image

The previous endpoint (www.azion.com/api/pricing) now returns an HTML
404 page, crashing the build with a JSON parse error. Point the fetch
at the working edge application host and fail with a clear error when
the API responds with a non-2xx status.
@pedro-ribeiro-azion
pedro-ribeiro-azion merged commit e1618de into aziontech:main Jul 23, 2026
@souzavinny
souzavinny deleted the fix/pricing-api-endpoint branch July 23, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants