WP/PHP getting API data and using hook
You will need to settle on the variable name containing $request[ 'ID' ];. At the moment, you are using $publisher_id and $publisher ...which of course is a script fouling typo. I'd probably avoid declaring the variable, because I don't find a declarative coding style to be very beneficial in this case.
You could use a different syntax to declare your array to be less verbose. For example:

 $response['status'] = 404;
 $response['data']['errors']['general'] = 'Sorry, no record was found.';

By writing an if-else, you can avoid rewriting json_encode().


..I don't WP so I cannot say if there any native techniques to leverage.

The first function could look like this:

function get_publisher(\WP_REST_Request $request) {   
    $request = json_decode($request);
    if (empty($request['ID'])) {
        $response['status'] = 404;
        $response['data']['errors']['general'] = 'Sorry, no record was found.';
    } else {
        $response['status'] = 200;
        $response['data']['publisher'] = $request['ID'];
    }
    return json_encode($response);
}