Skip to content

Commit

Permalink
Log error message for the Clockify client
Browse files Browse the repository at this point in the history
  • Loading branch information
eXpl0it3r committed Aug 26, 2023
1 parent 4f5f0d2 commit 527dbb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
run: dotnet build --configuration Debug --no-restore
- name: Publish
run: dotnet publish --runtime ${{ matrix.platform.rid }} --self-contained --configuration Release -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true
run: dotnet publish --runtime ${{ matrix.platform.rid }} --self-contained --configuration Debug -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -p:IncludeNativeLibrariesForSelfExtract=true
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions Clockify/ClockifyContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public async Task ToggleTimerAsync()
var workspaces = await _clockifyClient.GetWorkspacesAsync();
if (!workspaces.IsSuccessful || workspaces.Data is null)
{
_logger.LogWarn("Unable to retrieve available workspaces");
_logger.LogWarn($"Unable to retrieve available workspaces: {workspaces.ErrorMessage}");
return;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ public async Task<TimeEntryDtoImpl> GetRunningTimerAsync()
var workspaces = await _clockifyClient.GetWorkspacesAsync();
if (!workspaces.IsSuccessful || workspaces.Data is null)
{
_logger.LogWarn("Unable to retrieve available workspaces");
_logger.LogWarn($"Unable to retrieve available workspaces: {workspaces.ErrorMessage}");
return null;
}

Expand Down Expand Up @@ -184,7 +184,7 @@ private async Task StopRunningTimerAsync()
var workspaces = await _clockifyClient.GetWorkspacesAsync();
if (!workspaces.IsSuccessful || workspaces.Data is null)
{
_logger.LogWarn("Unable to retrieve available workspaces");
_logger.LogWarn($"Unable to retrieve available workspaces: {workspaces.ErrorMessage}");
return;
}

Expand Down Expand Up @@ -214,7 +214,7 @@ private async Task<ProjectDtoImpl> FindMatchingProjectAsync(string workspaceId)
var projects = await _clockifyClient.FindAllProjectsOnWorkspaceAsync(workspaceId, false, _projectName, pageSize: 5000);
if (!projects.IsSuccessful || projects.Data is null)
{
_logger.LogWarn($"Unable to retrieve project {_projectName} on workspace {_workspaceName}");
_logger.LogWarn($"Unable to retrieve project {_projectName} on workspace {_workspaceName}: {projects.ErrorMessage}");
return null;
}

Expand Down

0 comments on commit 527dbb1

Please sign in to comment.