eclipse-iceoryx / eclipse-iceoryx/iceoryx2

Improve error codes on failed service creation

Open
#183 0 comments 0 reactions 1 assignee Claimed by @elBoberido View on GitHub
Dominant language
Rust
Stars
2.5k
Forks
185
Avg merge
1d 23h
Merged PRs (30d)
47

Description

## Brief feature description

Currently, when a service is created by two parties concurrently, some of the error codes are not too helpful and sometimes misleading. Similar with concurrently opening and closing a service.

This are the error codes which are triggered in `service_tests.rs`

```rust
PublishSubscribeCreateError::AlreadyExists,
PublishSubscribeCreateError::Corrupted,
PublishSubscribeCreateError::IsBeingCreatedByAnotherInstance,
```

```rust
PublishSubscribeOpenError::DoesNotExist,
PublishSubscribeOpenError::PermissionDenied,
PublishSubscribeOpenError::ServiceInCorruptedState,
PublishSubscribeOpenError::UnableToOpenDynamicServiceInformation,
```

The latter, for example, should only trigger `DoesNotExist`. See also https://github.com/eclipse-iceoryx/iceoryx2/pull/174#discussion_r1561100720.

The other error codes leak implementation details and only occur due to the decentralized nature of iceoryx2. It needs to be determined if they can be mapped to `DoesNotExist` without shadowing an actual error when, e.g. the permissions really do not exist.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.