PERS SDK - v2.3.26 / Exports / ApiResponse
Generic API response wrapper for client-side operations Provides consistent structure for success/error handling
Aligns with StructuredError pattern from @explorins/pers-shared Note: PERS API endpoints return DTOs directly (not wrapped in success/data) This is for client-side consistency when apps need response wrappers
| Name |
|---|
T |
• success: boolean
Indicates if the operation was successful
shared/interfaces/pers-shared-lib.interfaces.ts:32
• data: T
Response data (present on success)
shared/interfaces/pers-shared-lib.interfaces.ts:34
• Optional message: string
Optional success message
shared/interfaces/pers-shared-lib.interfaces.ts:36
• Optional error: Object
Structured error details (present on failure)
| Name | Type | Description |
|---|---|---|
code | string | Error code (e.g., 'INVALID_REQUEST', 'NOT_FOUND') |
message | string | User-friendly error message |
details? | unknown | Additional error context |