> ## Documentation Index
> Fetch the complete documentation index at: https://gmlp.kdco.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Error handling

> Use safe envelopes or throwing variants depending on the integration boundary.

## Safe variants

Safe variants return the same envelope shape even on failure.

```ts theme={null}
const result = parseGoogleMapsUrl("https://share.google/example");

if (result.status === "error") {
  console.error(result.error?.code, result.error?.message);
}
```

## Throwing variants

Throwing variants are better when invalid input should halt a request immediately.

```ts theme={null}
import { unfurlGoogleMapsUrlOrThrow } from "google-maps-link-parser";

const result = await unfurlGoogleMapsUrlOrThrow(url);
```

## Provider denied responses

Denied provider responses are not treated like parser crashes.

Instead, enriched mode records them as:

* warning diagnostics
* `raw.providerErrors`
* preserved normalized data from the parse or unfurl stage

That means you can still use the URL-derived data even when a Google API key is restricted or a provider is disabled.
