PageSourceSearch

https://files.tapstitch.com/tapstitch/site-static/tapstitch/20260924-307/_nuxt/C0goc7ns.js

js tapstitch.com collected 2026-09-25 14:52:17 UTC 2,578 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./entry.CD64OwU4.css"])))=>i.map(i=>d[i]);
2import{e as P,bu as A,Y as E,r as i,B as k,c as g,o as y,b as a,a as _,g as H,t as T,h as t,i as s,w as h,j as w,k as x,l as v}from"./DWjffqtD.js";x("element-plus/es/components/button/style/css",()=>v(()=>import("./DWjffqtD.js").then(d=>d.hM),__vite__mapDeps([0]),import.meta.url));x("@tapstitch/ts-ui/Button/style/index.css",()=>v(()=>import("./CpvvVBGY.js"),[],import.meta.url));const C={class:"mx-auto flex min-h-screen max-w-[720px] flex-col justify-center px-5 py-10"},B={class:"rounded-lg border border-border bg-white p-6 shadow-sm"},L={class:"text-sm text-secondary"},V={class:"mt-3"},N={key:0,class:"mt-4 text-sm text-primary"},I=P({__name:"alarm-test",setup(d){const{$api:u}=A(),{env:c}=E(),r=i(!1),l=i(!1),e=i(""),n=k(()=>c==="prod"),f=async()=>{if(n.value){e.value="Production environment is blocked for this alarm test.";return}r.value=!0,e.value="";try{await u("/api/test-error?type=500"),e.value="Unexpected success: test endpoint did not return HTTP 500."}catch{e.value="HTTP 500 test request completed through $api."}finally{r.value=!1}},b=async()=>{if(n.value){e.value="Production environment is blocked for this alarm test.";return}l.value=!0,e.value="";try{await u("/api/test-payload-too-large",{method:"POST",body:{message:"payload too large alarm test",payload:"x".repeat(2048)},customOptions:{forceAlarm:!0}}),e.value="Unexpected success: payload-too-large endpoint did not return HTTP 413."}catch{e.value="HTTP 413 payload-too-large request completed through $api. Robot alarm should be triggered."}finally{l.value=!1}};return(p,o)=>{const m=w;return y(),g("main",C,[a("section",B,[a("p",L,"Current env: "+T(t(c)||"-"),1),o[2]||(o[2]=a("h1",{class:"mt-3 text-2xl font-semibold text-primary"},"Alarm Robot HTTP Error Test",-1)),o[3]||(o[3]=a("p",{class:"mt-3 text-sm leading-6 text-secondary"},[s(" Click the button to call "),a("code",null,"/api/test-error?type=500"),s(" through "),a("code",null,"$api"),s(". This enters "),a("code",null,"onResponseError"),s(" and exercises the alarm robot reporting path. ")],-1)),_(m,{class:"mt-6",loading:t(r),disabled:t(r)||t(n),onClick:f},{default:h(()=>[...o[0]||(o[0]=[s(" Trigger HTTP 500 Alarm ",-1)])]),_:1},8,["loading","disabled"]),a("div",V,[_(m,{type:"outline-light",loading:t(l),disabled:t(l)||t(n),onClick:b},{default:h(()=>[...o[1]||(o[1]=[s(" Trigger HTTP 413 Payload Too Large API Alarm ",-1)])]),_:1},8,["loading","disabled"])]),t(e)?(y(),g("p",N,T(t(e)),1)):H("",!0)])])}}});export{I as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.