protected function getStatusCodeFromApiProblem(ApiProblem $problem)
    {
        $problemData = $problem->toArray();
        $status = array_key_exists('status', $problemData) ? $problemData['status'] : 0;

        if ($status < 100 || $status >= 600) {
            return 500;
        }

        return $status;
    }