PulpRpmClient::ApiError: Error message: the server returns an error HTTP status code: 404

Problem:
I keep getting this error when trying to sync my repos and update my content views:

The requested resource was not found on this server

Expected outcome:
To have my repos sync and content views update.

Foreman and Proxy versions:
Version 3.1.2

Foreman and Proxy plugin versions:
Katello 4.3.1: adds Content and Subscription Management to Foreman. For this it relies on Candlepin and Pulp.

foreman-tasks 5.2.2: The goal of this plugin is to unify the way of showing task statuses across the Foreman instance. It defines Task model for keeping the information about the tasks and Lock for assigning the tasks to resources. The locking allows dealing with preventing multiple colliding tasks to be run on the same resource. It also optionally provides Dynflow infrastructure for using it for managing the tasks.

foreman_remote_execution 5.0.3: A plugin bringing remote execution to the Foreman, completing the config management functionality with remote management functionality.
katello

Distribution and version:
Centos7 and Centos8

Other relevant data:
Actions::Pulp3::Repository::RefreshRemote

Input:

{“repository_id”=>9,
“smart_proxy_id”=>1,
“remote_user”=>“admin”,
“remote_cp_user”=>“admin”,
“current_request_id”=>“d3403ccb-746f-45a1-a095-d89277a2f91d”,
“current_timezone”=>“UTC”,
“current_organization_id”=>1,
“current_location_id”=>nil,
“current_user_id”=>1}

Output:

{}

Exception:

PulpRpmClient::ApiError: Error message: the server returns an error
HTTP status code: 404
Response headers: {“date”=>“Fri, 16 Sep 2022 04:00:10 GMT”, “server”=>“gunicorn”, “content-type”=>“text/html; charset=UTF-8”, “x-frame-options”=>“DENY”, “content-length”=>“179”, “x-content-type-options”=>“nosniff”, “referrer-policy”=>“same-origin”, “correlation-id”=>“d3403ccb-746f-45a1-a095-d89277a2f91d”, “access-control-expose-headers”=>“Correlation-ID”, “via”=>“1.1 servername”, “connection”=>“close”}
Response body:
<!doctype html>

Not Found

Not Found

The requested resource was not found on this server.