plc.publish bails on a non-2xx from the directory, and migrate_complete maps that to 500 InternalServerError. The directory's reason is carried in the message. The refusals come from the caller-supplied recommendedCreds: a malformed key, too many rotation keys, or a race on prev. A caller reads these as a host fault and not as a refusal. completeImport answers the same case as 400 InvalidOperation (import.rs:558).
How to see it
Read against docs/fresh at 4636e6d, the code at: migration.rs:707-710 (also last_op at 667-671 and in migrate_prepare 150-154). Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Map a publish refusal to 400 InvalidOperation (or a refused error), as completeImport does. Keep 500 for transport errors.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
plc.publishbails on a non-2xx from the directory, andmigrate_completemaps that to 500InternalServerError. The directory's reason is carried in the message. The refusals come from the caller-suppliedrecommendedCreds: a malformed key, too many rotation keys, or a race onprev. A caller reads these as a host fault and not as a refusal.completeImportanswers the same case as 400InvalidOperation(import.rs:558).How to see it
Read against
docs/freshat 4636e6d, the code at: migration.rs:707-710 (alsolast_opat 667-671 and inmigrate_prepare150-154). Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Map a publish refusal to 400
InvalidOperation(or arefusederror), as completeImport does. Keep 500 for transport errors.Where
The host, as built from 4636e6d. Found while checking the docs against the code.