Skip to content

fix(ios): expose localized provider configuration errors - #202

Open
Aaqibhafeezkhan wants to merge 1 commit into
gmi-software:mainfrom
Aaqibhafeezkhan:fix/ios-provider-error-description
Open

Aaqibhafeezkhan wants to merge 1 commit into
gmi-software:mainfrom
Aaqibhafeezkhan:fix/ios-provider-error-description

Conversation

@Aaqibhafeezkhan

@Aaqibhafeezkhan Aaqibhafeezkhan commented Oct 13, 2026 •

Copy link
Copy Markdown

Summary

Fixes an iOS error-reporting issue where Google Maps provider configuration errors reach JavaScript as Swift enum case names instead of actionable error messages.

Changes

  • Make MapProviderConfigurationError conform to CustomStringConvertible.
  • Reuse the existing errorDescription so Swift string conversion preserves the localized message.
  • Add XCTest coverage for all three configuration error cases.
  • Keep the existing placeholder view text and error-handling call sites unchanged.

Validation

  • Added regression tests for a missing Google Maps API key, an unlinked Google Maps SDK, and an unsupported iOS provider.

Fixes #135


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d18aa54e-7f21-4568-ab20-f04b0475740d
📥 Commits

Reviewing files that changed from the base of the PR and between d1f65d4 and 00c14fa.

📒 Files selected for processing: 2
  • package/ios/GoogleMapsAPIKey.swift
  • package/iosTests/MapProviderConfigurationErrorTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

📝 Summary

Summary by CodeRabbit

  • Bug Fixes
    • Map provider configuration errors now display their specific explanation when available, including issues with a missing Google Maps API key, an unlinked Google Maps SDK, or an unsupported Mapbox provider. When no explanation is available, a general configuration error message is shown. This makes map setup failures more informative.

MapProviderConfigurationError now conforms to CustomStringConvertible. Its description returns errorDescription or a fallback string. XCTest covers three error cases and their localized descriptions.

Changes: iOS map provider error descriptions

Layer / File(s) Summary
Error description and test coverage
package/ios/GoogleMapsAPIKey.swift, package/iosTests/MapProviderConfigurationErrorTests.swift
MapProviderConfigurationError now returns its localized error description, or a fallback when none is available. Tests check the string and localized descriptions for three error cases.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 00c14

No actionable defect is established. The JavaScript rejection message has not been confirmed, so that acceptance criterion remains to be validated.

Security architecture risk: ⚪ Minimal · up to 00c14

The change reuses existing configuration guidance without including API-key values or changing provider validation, SDK initialization, or error-handling authority. No material security risk was identified. The exact JavaScript error text and native test execution remain unverified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The changed exposure is bounded to diagnostic text for iOS provider failures in existing consumers. Whether the bridge uses description or another field affects message fidelity, but the inspected descriptions introduce neither credential disclosure nor additional execution authority.

Trust Boundaries and Controls

  • observed — Host configuration remains the API-key source. GoogleMapsAPIKey retains validation and SDK initialization ownership, and HybridMapView retains provider selection and failure containment. The new getter does not modify shared state or introduce a state transition.
Pre-merge checks: Passed 5 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 5 passed
Check name Status Explanation
Linked Issues check Passed Issue #135 requires localized messages for unavailable iOS providers, coverage for all three error cases, and unchanged placeholder text. MapProviderConfigurationError now conforms to `CustomStringC…
Out of Scope Changes check Passed The reported changes are limited to the error string conversion and its XCTest regression coverage. Both changes directly support issue #135. No unrelated production behavior or unrelated files are id…
Security Check Passed No medium-, high-, or critical-severity vulnerability was introduced. The diff only adds CustomStringConvertible.description, reusing existing fixed error text. The interpolated provider is a bounde…
Title check Passed The title accurately describes the iOS fix and includes the required change type prefix. It is 56 characters, slightly above the preferred 50-character limit, but remains concise and descriptive.
Description check Passed The description clearly explains the localized error-reporting fix, lists the code and test changes, and relates directly to the pull request objectives.
Full details: Linked Issues check

Explanation

Issue #135 requires localized messages for unavailable iOS providers, coverage for all three error cases, and unchanged placeholder text. MapProviderConfigurationError now conforms to CustomStringConvertible and returns errorDescription. The added XCTest file covers missing GoogleMapsIosApiKey, an unlinked Google Maps SDK, and interpolated unsupportedIOSProvider. The PR summary states that placeholder text and call sites remain unchanged. Native test execution is pending, but the required test coverage is present.

Full details: Out of Scope Changes check

Explanation

The reported changes are limited to the error string conversion and its XCTest regression coverage. Both changes directly support issue #135. No unrelated production behavior or unrelated files are identified.

Full details: Security Check

Explanation

No medium-, high-, or critical-severity vulnerability was introduced. The diff only adds CustomStringConvertible.description, reusing existing fixed error text. The interpolated provider is a bounded MapProvider value, and the result is used for error reporting and placeholder text, not an executable or request sink. No authentication, authorization, injection, secret-leakage, or dependency risk is present.

  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Google provider setup errors reach JS as Swift enum case names on iOS

1 participant