fix: throw SystemNotFound in SystemGet instead of 404ing

This commit is contained in:
spiral
2021-11-07 13:56:15 -05:00
parent 3979cdd95a
commit b273b49533

View File

@@ -20,7 +20,7 @@ namespace PluralKit.API
public async Task<IActionResult> SystemGet(string systemRef)
{
var system = await ResolveSystem(systemRef);
if (system == null) return NotFound();
if (system == null) throw Errors.SystemNotFound;
else return Ok(system.ToJson(this.ContextFor(system), v: APIVersion.V2));
}