Update error-handling for API-consistency
Fix unsafe warning