public function progress(HTTPRequest $request)
    {
        if (!Security::getCurrentUser()) {
            return $this->makeJsonReponse(401, [
                'message' => 'Unauthorized.'
            ])->setStatusDescription('Unauthorized.');
        }

        $latest_job = FetchJob::get()->filter('ErrorShown', 0)->sort('Created DESC')->first();

        if ($latest_job) {
            $map = $latest_job->toMap();
            if ($latest_job->Status === "Error") {
                $latest_job->ErrorShown = 1;
                $latest_job->write();
            }

            return $this->makeJsonReponse(200, $map);
        }

        return $this->makeJsonReponse(200, [
            'message' => 'No hail job found.',
            'Status' => 'Done'
        ]);

    }