Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/recyclarr/commit/1ab44f974c1bd90b5b27e8efd2a840f2821a54ab
You should set ROOT_URL correctly, otherwise the web may not work correctly.
4 changed files with
29 additions and
10 deletions
@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
instead of `~/.config/recyclarr` . Recyclarr will attempt to move this directory when run. If it
can't, then manual intervention is needed by users (e.g. `recyclarr migrate` ).
### Fixed
- Print more useful diagnostics when there's a connectivity problem to a service (e.g. incorrect
`base_url` ).
## [6.0.2] - 2023-10-20
### Fixed
@ -8,14 +8,16 @@ public class FlurlHttpExceptionHandler(ILogger log) : IFlurlHttpExceptionHandler
[SuppressMessage("Design", "CA1031:Do not catch general exception types")]
public async Task ProcessServiceErrorMessages ( IServiceErrorMessageExtractor extractor )
{
var statusCode = extractor . GetHttpStatusCode ( ) ;
switch ( statusCode )
switch ( extractor )
{
case 401 :
case { HttpStatusCode : 401 } :
log . Error ( "Reason: Recyclarr is unauthorized to talk to the service. Is your `api_key` correct?" ) ;
break ;
case { HttpStatusCode : null } :
log . Error ( "Reason: Problem connecting to service. Is your `base_url` correct?" ) ;
break ;
default :
ProcessBody ( await extractor . GetErrorMessage ( ) ) ;
break ;
@ -47,6 +49,7 @@ public class FlurlHttpExceptionHandler(ILogger log) : IFlurlHttpExceptionHandler
}
// Last resort
log . Error ( "Reason: Unable to determine. Please report this as a bug and attach your `verbose.log` file." ) ;
log . Error (
"Reason: Unable to determine. Please report this as a bug and attach your `debug.log` and `verbose.log` files." ) ;
}
}
@ -3,5 +3,6 @@ namespace Recyclarr.Cli.Processors.ErrorHandling;
public interface IServiceErrorMessageExtractor
{
Task < string > GetErrorMessage ( ) ;
int? GetHttpStatusCode ( ) ;
int? HttpStatusCode { get ; }
HttpRequestError ? HttpError { get ; }
}
@ -4,13 +4,23 @@ namespace Recyclarr.Cli.Processors.ErrorHandling;
public class ServiceErrorMessageExtractor ( FlurlHttpException e ) : IServiceErrorMessageExtractor
{
public async Task < string > GetErrorMessage ( )
public HttpRequestError ? HttpError
{
return await e . GetResponseStringAsync ( ) ;
get
{
if ( e . InnerException is not HttpRequestException http )
{
return null ;
}
return http . HttpRequestError ;
}
}
public int? GetHttpStatusCode ( )
public async Task < string > GetErrorMessag e( )
{
return e . StatusCode ;
return await e . GetResponseStringAsync ( ) ;
}
public int? HttpStatusCode = > e . StatusCode ;
}