When try subscript server katello returns error

Problem:
When try subscript server katello returns error
Expected outcome:

Foreman and Proxy versions:
1.2
Foreman and Proxy plugin versions:
1.2
Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three b

ack-ticks to get proper formatting, e.g.)

logs

HTTP error (422 - Unknown): Validation failed: Medium must belong to host’s operating system

A couple things i would check:

Did this host already exist prior to registration? It sounds like the host has an installation medium associated that does not belong to the operating system that this host is claiming to be (either that its already associated with, or that the registration is trying to associate it with).

What’s the OS of this host? You might try associating whatever installation medium the host is using to the operating system that the host claims to be.

I forced remove the associated installation medium to be able to make the registration. Thank you