If you build anything fintech-adjacent in Peru, you're going to talk to the BCRP API (the central bank's stats endpoint). It looks like a normal JSON API: GET https://estadisticas.bcrp.gob.pe/estadisticas/series/api/PD04637PD/json/2026-04-01/2026-04-26 Enter fullscreen mode Exit fullscreen mode And the response starts like a normal JSON: { "config" : { "title" : "Tipo de cambio" , "series" : [ ... ] }, "periods" : [ { "name" : "01.Abr.26" , "values" : [ "3.454" ] }, ... ] } Enter fullscreen mode Exit fullscreen mode But scroll to the bottom and you find this: }<br /> <b>Notice</b>: Undefined index ... Enter fullscreen mode Exit fullscreen mode Yes — the BCRP API appends raw HTML and PHP warnings after the closing JSON brace. A naive JSON.parse(text) throws SyntaxError: Unexpected non-whitespace character after JSON at position 1086 . Your pipeline crashes at 3am. Your monitoring gets noisy. Your team starts hating Peru's central bank. The fix const text = await fetch ( url ).…