# onLoadSubResourceError()

```ts
function onLoadSubResourceError(handler): 
  | HookExtension<HookEvent<"error", SubResourceErrorEvent>>
  | null;
```

**`Android`**

Calls `handler` for each of the page's requests that fails, such as an image, a script or an iframe, but not the main frame's, which goes to `onError`: react-native-webview's `onLoadSubResourceError`.

A request whose SSL check fails isn't reported. A response with an HTTP error status, such as a 404, isn't reported either: only network errors are.

**Parameters**

| Parameter | Type |
| --- | --- |
| `handler` | (`event`) =\> `void` |

**Returns**

| [`HookExtension`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/react-native-minimal-webview/type-aliases/HookExtension/index.md>)\<[`HookEvent`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/react-native-minimal-webview/type-aliases/HookEvent/index.md>)\<`"error"`, [`SubResourceErrorEvent`](<https://rasmuskard.github.io/react-native-minimal-webview/typescript/extensions/type-aliases/SubResourceErrorEvent/index.md>)\>\> | `null`

Null on iOS.
