mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Added check to deletion to handle git accounts not existing.
This commit is contained in:
parent
99378c6e30
commit
16099529d1
@ -399,7 +399,11 @@ namespace Teknik.Areas.Profile.Controllers
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return Json(new { error = "Unable to delete git account. Exception: " + ex.Message });
|
// This error signifies the user doesn't exist, so we can continue deleting
|
||||||
|
if (ex.Message != "The remote server returned an error: (404) Not Found.")
|
||||||
|
{
|
||||||
|
return Json(new { error = "Unable to delete git account. Exception: " + ex.Message });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user