~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A directory refusal in `migrateComplete` is a 500

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

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.