Types & Errors
Types & Errors
Request And Response Types
The SDK exports all request and response types as TypeScript interfaces. Simply import them using the MMG namespace:
Exception Handling
When the API returns a non-success status code (4xx or 5xx response), a subclass of MMGError will be thrown. You can catch these errors to inspect the status code and raw response.
