Skip to content

fix: Inconsistent error codes when missing file - #14

Merged
OS-ruimoreiramendes merged 7 commits into
mainfrom
fix/RMET-4962/error-codes
Feb 13, 2026
Merged

fix: Inconsistent error codes when missing file#14
OS-ruimoreiramendes merged 7 commits into
mainfrom
fix/RMET-4962/error-codes

Conversation

@OS-ruimoreiramendes

@OS-ruimoreiramendes OS-ruimoreiramendes commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes inconsistent error handling in iOS where certain filesystem operations were returning a generic operationFailed error (OS-PLUG-FILE-0013) instead of the expected fileNotFound error (OS-PLUG-FILE-0008) when the target file didn't exist.
As part of this fix, filesystem methods were tested on both iOS and Android to ensure error code parity across platforms.
No additional inconsistencies were identified beyond the ones addressed in this PR.

Context

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Tests

Use the capacitor-filesystem example app (iOS) on branch https://github.com/ionic-team/capacitor-filesystem/tree/temp/RMET-4962/error-codes

Checklist

  • Pull request title follows the format RNMT-XXXX <title>
  • Code follows code style of this project
  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

@OS-ruimoreiramendes
OS-ruimoreiramendes marked this pull request as ready for review February 12, 2026 14:43
@OS-ruimoreiramendes
OS-ruimoreiramendes requested a review from a team February 12, 2026 14:43
Comment thread CHANGELOG.md Outdated

@andredestro andredestro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left two suggestions unrelated to your changes, and it's completely fine if you choose not to include them.

Comment thread IONFilesystemLib/IONFILEManager.swift Outdated
Comment thread IONFilesystemLib/IONFILEManager.swift Outdated
OS-ruimoreiramendes and others added 3 commits February 13, 2026 10:15
Co-authored-by: André Destro <254790+andredestro@users.noreply.github.com>
Co-authored-by: André Destro <254790+andredestro@users.noreply.github.com>
@OS-ruimoreiramendes

Copy link
Copy Markdown
Contributor Author

As discussed on Slack, I added new tests and fix the ones that were failing after introducing the new validations.

@OS-ruimoreiramendes
OS-ruimoreiramendes merged commit 75d2681 into main Feb 13, 2026
1 check passed
capacitor-bot pushed a commit that referenced this pull request Feb 13, 2026
## [1.1.1](1.1.0...1.1.1) (2026-02-13)

### Bug Fixes

* Inconsistent error codes when missing file ([#14](#14)) ([75d2681](75d2681))
capacitor-bot pushed a commit that referenced this pull request Feb 13, 2026
## [1.1.1](1.1.0...1.1.1) (2026-02-13)

### Bug Fixes

* Inconsistent error codes when missing file ([#14](#14)) ([75d2681](75d2681))
@OS-ruimoreiramendes
OS-ruimoreiramendes deleted the fix/RMET-4962/error-codes branch February 18, 2026 10:21
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.

2 participants