---
title: 'Callbacks and errors'
url: 'https://docs.geens.com/geens-partners/geens-sdk/browser-sdk/callbacks-and-errors'
markdown: 'https://docs.geens.com/geens-partners/geens-sdk/browser-sdk/callbacks-and-errors.md'
date: '2026-12-03'
description: 'Most methods take success and error callbacks as their last two arguments; they do not return Promises. Supply {} when an options object is required but you are not accessing a shared link. Optional positional values still need a null or undefined placeholder when later arguments follow. Validatio…'
---

# Callbacks and errors

[](#)# Callbacks and errors

Most methods take success and error callbacks as their last two arguments; they do not return Promises. Supply `{}` when an options object is required but you are not accessing a shared link. Optional positional values still need a `null` or `undefined` placeholder when later arguments follow.

Validation can throw synchronously, while network and permission failures are usually delivered to the error callback. Handle both:

```javascript
const onSuccess = response => console.log(response);
const onError = error => console.error(error);

try {
  sdk.getItem([123], {}, onSuccess, onError);
} catch (error) {
  onError(error);
}
```

Error values can be `Error` objects, strings, or API responses. For example, `user_is_missing_required_permissions` indicates a missing Geens permission. The API examples below reuse `sdk`, `onSuccess`, and `onError` from above. Sample item IDs must be replaced with IDs your session can access.

---

## Navigation

- Parent: [Browser SDK](https://docs.geens.com/geens-partners/geens-sdk/browser-sdk.md)
- Previous: [Configuration](https://docs.geens.com/geens-partners/geens-sdk/browser-sdk/configuration.md)
- Next: [TypeScript](https://docs.geens.com/geens-partners/geens-sdk/browser-sdk/typescript.md)
