Error Handling
The SDK maps HTTP errors to typed classes:
400->RGWValidationError403->RGWAuthError404->RGWNotFoundError409->RGWConflictError5xx->RGWError
Example:
import { RGWNotFoundError } from 'radosgw-admin';
try {
await rgw.users.get('missing-user');
} catch (err) {
if (err instanceof RGWNotFoundError) {
// handle safely
}
}