Every failure the server answers with names its own error code
Each refusal and failure the client API sends now starts with a code no other failure uses, such as "[ERR0030006] That code is not valid.", so a screenshot or a report points at the exact place it came from. Nothing another program reads changes: ActivityPub, the Mastodon API's errors, sign-in tokens and the error kinds decePubClient branches on stay as they were. The house-rules checks move to 1.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4YtEJrgxG12Pc39Fai8Bd
This commit is contained in:
1 parent
f3fdeaf038
commit
c2f439d1e9
25 files changed
+268
-224
No files matched your search
@@ -34,7 +34,7 @@ namespace PrivaPub.Controllers.ClientToServer
|
||||
{
|
||||
var domain = DomainBlocks.Normalise(form.Domain);
|
||||
if (!ModelState.IsValid || Uri.CheckHostName(domain) != UriHostNameType.Dns)
|
||||
return BadRequest(new WebResult().Invalidate(localizer["Invalid model."]));
|
||||
return BadRequest(new WebResult().Invalidate(13001.ToCodedError(localizer["Invalid model."])));
|
||||
|
||||
var block = await DB.Default.UpdateAndGet<DomainBlock>()
|
||||
.Match(b => b.Domain == domain)
|
||||
|
||||
Reference in new issue
Block a user