Skip to content

chore: remove unused error codes from IONCAMRError#12

Merged
alexgerardojacinto merged 3 commits intofeat/RMET-4099/android-implementationfrom
feat/RMET-5076/update-errors
Mar 27, 2026
Merged

chore: remove unused error codes from IONCAMRError#12
alexgerardojacinto merged 3 commits intofeat/RMET-4099/android-implementationfrom
feat/RMET-5076/update-errors

Conversation

@alexgerardojacinto
Copy link
Copy Markdown
Contributor

@alexgerardojacinto alexgerardojacinto commented Mar 26, 2026

Summary

  • Removes 7 unused error codes from IONCAMRError: NO_IMAGE_SELECTED_ERROR, GET_IMAGE_ERROR, PERMISSION_DENIED_ERROR, UNABLE_TO_ACCESS_GALLERY_ERROR, FILE_NOT_FOUND_OR_INACCESSIBLE_ERROR, FAILED_TO_SAVE_FILE_ERROR, and RESOURCE_BUSY_ERROR
  • Cleans up dead code to keep the error enum lean and consistent with what the library actually surfaces

Removes NO_IMAGE_SELECTED_ERROR, GET_IMAGE_ERROR, PERMISSION_DENIED_ERROR,
UNABLE_TO_ACCESS_GALLERY_ERROR, FILE_NOT_FOUND_OR_INACCESSIBLE_ERROR,
FAILED_TO_SAVE_FILE_ERROR, and RESOURCE_BUSY_ERROR as they are no longer used.
@alexgerardojacinto alexgerardojacinto changed the title feat(RMET-5076): remove unused error codes from IONCAMRError chore: remove unused error codes from IONCAMRError Mar 26, 2026
@alexgerardojacinto alexgerardojacinto self-assigned this Mar 26, 2026

enum class IONCAMRError(val code: Int, val description: String) {
CAMERA_PERMISSION_DENIED_ERROR(3, "Couldn't access camera. Check your camera permissions and try again."),
NO_IMAGE_SELECTED_ERROR(5, "No image selected."),
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.

Should we re-use 5 for something then? Don't see it being used elsewhere.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes we should. I was still going to do that but wanted to go through the list of errors in Confluence first and only then start changing error codes

Copy link
Copy Markdown
Contributor Author

@alexgerardojacinto alexgerardojacinto Mar 27, 2026

Choose a reason for hiding this comment

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

Changed it now, it's being used for the GALLERY_PERMISSION_DENIED_ERROR now

NO_CAMERA_AVAILABLE_ERROR(8, "No camera available."),
EDIT_IMAGE_ERROR (10, "Couldn't edit image."),
TAKE_PHOTO_ERROR(11, "Couldn't capture picture."),
GET_IMAGE_ERROR(12, "Couldn't get image from the gallery."),
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.

This one's being used on iOS, so we can't re-use it for something else on Android right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe we can use it here instead of GENERIC_CHOOSE_MULTIMEDIA_ERROR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't see anywhere to use it. @OS-ruimoreiramendes the line you shared can also be returned for videos, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hum yeah, is for both images and videos, so doesn't make sense to use GET_IMAGE_ERROR since specifies images

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah so I don't see anywhere else we can use it - and that's fine

@alexgerardojacinto alexgerardojacinto merged commit d7be685 into feat/RMET-4099/android-implementation Mar 27, 2026
2 checks passed
@alexgerardojacinto alexgerardojacinto deleted the feat/RMET-5076/update-errors branch March 27, 2026 19:56
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.

3 participants