private function validateError(UploadedFile $uploadedFile) {
        switch($uploadedFile->getError()) {
            case UPLOAD_ERR_OK:
                //Do Nothing
                break;
            case UPLOAD_ERR_INI_SIZE:
                throw new Exception('File too large, must not be greater than ' . ini_get('upload_max_filesize'), 401);
                break;
            case UPLOAD_ERR_NO_FILE:
                throw new Exception('No File Uploaded', 401);
                break;
            default:
                throw new Exception($uploadedFile->getError(), 401);
                break;
        }
    }