1

API ServiceException Catlight.Entities.ServerApi.ServiceException: Unauthorized.

Hi, 

Sometimes, I get this errors, I don't know what's happening.

Here's the logs:

2022-07-20 09:49:20.0136 | WARN | Catlight.Service.Common.ApiErrorHandlingMiddleware | 23 | API ServiceException Catlight.Entities.ServerApi.ServiceException: Unauthorized. Request id: 0498eb756eb4
at Web.Services.CatlightServiceClient.EnsureResponseSuccess(HttpResponseMessage response, String requestId) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 150
at Web.Services.CatlightServiceClient.ApiSend[T](HttpMethod method, String uri, Object body, CancellationToken cancellationToken) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 90
at Web.Services.CatlightServiceClient.ApiPost[T](String uri, Object body, CancellationToken cancellationToken) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 55
at Web.Services.CatlightServiceClient.ApiPost[T](String uri, Object body) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 49
at Web.Services.CatlightTeamManager.DiscoverTeams() in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightTeamManager.cs:line 34
at Web.Controllers.Api.TeamController.DiscoverTeams() in C:\build\1\_work\31\s\Desktop\LocalWeb\Controllers\Api\TeamController.cs:line 72
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Catlight.Service.Common.ApiErrorHandlingMiddleware.Invoke(HttpContext context) in C:\build\1\_work\31\s\Catlight.Service.Common\ApiErrorHandlingMiddleware.cs:line 49
2022-07-20 09:49:26.1048 | WARN | Web.Services.ClientStateReporter | 74 | Cannot report client status Catlight.Entities.ServerApi.ServiceException: Unauthorized. Request id: 2ba280a48871
at Web.Services.CatlightServiceClient.EnsureResponseSuccess(HttpResponseMessage response, String requestId) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 150
at Web.Services.CatlightServiceClient.ApiSend[T](HttpMethod method, String uri, Object body, CancellationToken cancellationToken) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 90
at Web.Services.CatlightServiceClient.ApiPost[T](String uri, Object body, CancellationToken cancellationToken) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 55
at Web.Services.CatlightServiceClient.ApiPost(String uri, Object body) in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\CatlightServiceClient.cs:line 45
at Web.Services.ClientStateReporter.SendReportIfChanged() in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\ClientStateReporter.cs:line 136
at Web.Services.ClientStateReporter.Handler() in C:\build\1\_work\31\s\Desktop\LocalWeb\Services\ClientStateReporter.cs:line 148

1 reply

This can happen if the password of OS user was reset, or application settings got copied from one computer to another.

You can try resetting the app - https://support.catlight.io/i283-how-to-reset-the-app