mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-11 15:56:05 -07:00
Fixes for sonarr, we now display the error messages back to the user
This commit is contained in:
parent
3efd54c1b6
commit
10be8f0440
7 changed files with 55 additions and 16 deletions
|
@ -133,15 +133,17 @@ namespace PlexRequests.UI.Modules
|
|||
Log.Trace("Approval result: {0}", requestResult);
|
||||
if (requestResult)
|
||||
{
|
||||
return Response.AsJson(new JsonResponseModel { Result = true });
|
||||
return Response.AsJson(new JsonResponseModel {Result = true});
|
||||
}
|
||||
return Response.AsJson(new JsonResponseModel { Result = false, Message = "Updated Sonarr but could not approve it in PlexRequests :(" });
|
||||
return
|
||||
Response.AsJson(new JsonResponseModel
|
||||
{
|
||||
Result = false,
|
||||
Message = "Updated Sonarr but could not approve it in PlexRequests :("
|
||||
});
|
||||
}
|
||||
return Response.AsJson(new JsonResponseModel
|
||||
{
|
||||
Result = false,
|
||||
Message = result.ErrorMessage ?? "Could not add the series to Sonarr"
|
||||
});
|
||||
return Response.AsJson(ValidationHelper.SendSonarrError(result.ErrorMessages));
|
||||
|
||||
}
|
||||
|
||||
var srSettings = SickRageSettings.GetSettings();
|
||||
|
@ -384,7 +386,7 @@ namespace PlexRequests.UI.Modules
|
|||
else
|
||||
{
|
||||
Log.Error("Could not approve and send the TV {0} to Sonarr!", r.Title);
|
||||
Log.Error("Error message: {0}", res?.ErrorMessage);
|
||||
res?.ErrorMessages.ForEach(x => Log.Error("Error messages: {0}", x));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue