An application which has an endpoint that does not have a global scope cannot participate in cross-model relations. However, it is still possible to offer this endpoint.
This problem was noticed on juju agent version 2.9.43, but has also been tested on version 3.1.5. The examples below are for 3.1.5.
For example,
juju add-model offerer
juju deploy ubuntu
juju deploy ntp
juju relate ubuntu ntp
juju offer ntp:juju-info
juju add-model consumer
juju deploy ubuntu
juju consume admin/offerer.ntp
juju integrate ubuntu:juju-info ntp:juju-info
```
(note: offering juju-info here is silly, but this actually happened with a more complicated case and this is simpler to demonstrate)
This attempts to connect the relation but fails with an error message similar to: `... local endpoint must be globally scoped for remote relations`.
Am I right in assuming that there is no reason for a non-globally-scoped relation to be offered? In which case, maybe an error can be raised at the offer stage.