$params Request parameters. */ public function record( string $route, int $wp_user_id, string $method = 'POST', array $params = array() ): void { $action = ActionDescriptor::from_rest( $method, $route, $params ); try { $this->writer->append( array( 'ts' => new DateTimeImmutable( 'now' ), 'agent_id' => 0, 'wp_user_id' => $wp_user_id, 'source' => $action->source, 'action_cat' => $action->action_cat, 'entity_type' => $action->entity_type, 'entity_id' => $action->entity_id, 'ability_name' => null, 'status' => self::STATUS, 'input' => $action->input, 'result' => null, 'policy_id' => null, 'rule_index' => null, ) ); } catch ( LedgerUnavailable $busy ) { // What this row records has already happened, so failing the // request would not undo it. The row is skipped, as it was before // ADR-17 whenever an insert failed. return; } } }