---
title: Penanganan kesalahan
canonical: https://developer.unico.io/id/developers/sdks-and-tools/android/error-handling
locale: id
generated_by: markdown-export
---

- [/id/](/id/)
- [SDK dan Alat](/id/developers/sdks-and-tools/overview)
- [Android SDK](/id/developers/sdks-and-tools/android/requirements)
- Penanganan kesalahan

# Penanganan kesalahan

Semua penanganan kesalahan untuk Android SDK dipusatkan di bagian ini. Callback `onErrorAcessoBio` menerima objek `ErrorBio` dengan `code` (Int) dan `description` (String).

Menangani callback
- Kotlin
- Java

```
override fun onErrorAcessoBio(error: ErrorBio) {**  when (error.code) {    73002 -> { /* camera permission denied — redirect to app settings */ }    73006 -> { /* running on emulator — physical device required */ }    73100 -> { /* no internet connection */ }    else -> { /* generic error handling */ }  }}
```

```
@Overridepublic void onErrorAcessoBio(ErrorBio error) {  switch (error.getCode()) {    case 73002: /* camera permission denied — redirect to app settings */ break;    case 73006: /* running on emulator — physical device required */ break;    case 73100: /* no internet connection */ break;    default: /* generic error handling */  }}
```

Callback siklus hidup
Selain `onErrorAcessoBio`, SDK juga memicu:

`onUserClosedCameraManually()` — pengguna menutup kamera secara manual.
`onSystemClosedCameraTimeoutSession()` — sesi berakhir karena waktu habis.
`onSystemChangedTypeCameraTimeoutFaceInference()` — tidak ada wajah terdeteksi selama 13 detik; SDK beralih ke pengambilan gambar manual.

Kode kesalahan
Semua kode kesalahan berasal dari enum `UnicoException` dan disampaikan melalui `ErrorBio(code, message)`. Kolom `message` berisi string SDK yang tepat — jangan dimodifikasi atau diterjemahkan.
KodePesanDeskripsi`73001``Context invalid`Konteks Android yang tidak valid diteruskan ke SDK`73002``Did not grant permission to open camera`Izin kamera ditolak oleh pengguna`73003``The lest API is 21(LOLLIPOP`Level API perangkat di bawah minimum yang diperlukan (API 21)`73004``Could not find implementation interface callback iAcessoBioSelfie`Antarmuka `iAcessoBioSelfie` belum diimplementasikan`73005``Could not find implementation interface callback iAcessoBioDocument`Antarmuka `iAcessoBioDocument` belum diimplementasikan`73006``Unable to open camera on emulators`SDK tidak berjalan di emulator — gunakan perangkat fisik`73007``Unknown and unexpected error in WebApp…`Kesalahan umum WebApp (kamera, penyimpanan, keamanan, jaringan)`73100``Unable to connect to internet.`Tidak ada koneksi internet yang tersedia`73200``Please inform the config object or json file name`Objek konfigurasi atau file JSON tidak disediakan`73202``Unable to parse json file`File konfigurasi JSON rusak`73204``Unable to initialize the SDK, please configure the environment on setEnviroment method of build``setEnvironment()` tidak dipanggil sebelum inisialisasi`73300``Unable to get unico authentication object`Gagal mengambil objek autentikasi`73301``Unable to parse object`Gagal mem-parse respons autentikasi`73302``Could not find the unico token`Token autentikasi Unico tidak ditemukan`73303``Current host is not registered`Pengenal bundle tidak terdaftar di SDK Key`73400``Could not initialize camera`Inisialisasi kamera gagal`73701``Could not find active liveness import`Modul deteksi kehidupan aktif tidak ditemukan`73703``Unable to get active liveness session`Gagal mendapatkan sesi deteksi kehidupan`73718``The Session was cancelled because of an unknown and unexpected error…`Kesalahan internal sesi yang tidak diketahui`73721``The Session can't be performed: attempts limit exceeded.`Sesi dibatalkan — batas percobaan pengambilan gambar terlampaui`73722``The Session can't be performed: face alignment timeout.`Sesi dibatalkan — timeout penyelarasan wajah`73726``An error happened during video recording`Kesalahan perekaman video selama deteksi kehidupan`73727``No actions found in a video`Tidak ada aksi deteksi kehidupan terdeteksi dalam video`73740``The user pressed the do not consent button and did not complete the Session.`Pengguna menolak persetujuan`73800``Could not build encrypted key.`Gagal membangun JWT terenkripsi`73801``The Session of SDK was cancelled because of an unknown and unexpected error.`Kesalahan internal sesi SDK yang tidak diketahui`73802``The Session was cancelled because of an unknown and unexpected error…`Sesi dibatalkan — field JWT yang diperlukan tidak ada`73900``Erro ao analisar imagem`Kesalahan saat menganalisis gambar yang diambil`73901``É necessário implementar a interface AcessoBioListener`Antarmuka `AcessoBioListener` belum diimplementasikan`73902``É necessário insirir um valor maior que 40 segundos no método: setTimeoutSession.`Nilai `setTimeoutSession` harus lebih besar dari 40 detik`73903``Arquivo de configuração corrompido. Verifique o arquivo json e tente novamente.`File konfigurasi rusak — verifikasi dan coba lagi`73904``Erro ao finalizar processo`Kesalahan saat menyelesaikan proses pengambilan gambar`73905``Unable to open document camera`Kamera dokumen tidak dapat dibuka`73906``Document type uninformed`Jenis dokumen tidak ditentukan`74001``onSuccess: not implemented when using open:webAppToken:`Callback `onSuccess` tidak diimplementasikan untuk User Journey`74100``Could not prepare SDK-S`Gagal menyiapkan komponen SDK`74101``No URL token was provided.`Tidak ada token URL yang disediakan untuk journey`74102``Environment type was not specified.`Environment (`PROD`/`UAT`) tidak dikonfigurasi`737120``Unable to initialize liveness`Aktivitas deteksi kehidupan tidak dapat diinisialisasi`737220``Capture could not start`Proses pengambilan gambar gagal dimulai`737320``Transaction could not start`Transaksi tidak dapat dimulai`737321``The Session was cancelled because of an unknown and unexpected error. This return value is a catch-all for errors experienced during normal usage of these APIs. Try again.`Kesalahan umum penyedia sesi — coba lagi
Kode kesalahan REST APIKode-kode di atas adalah kesalahan callback SDK. Kode kesalahan REST API (kelompok status HTTP) didokumentasikan secara terpisah di [Referensi API > Kode kesalahan](/id/developers/start/error-codes).Terakhir diperbarui pada 8 Okt 2026**