detail = $e->getMessage(); $e->title = self::TITLE; $e->type = self::TYPE; $e->status = StatusCodeInterface::STATUS_BAD_REQUEST; $e->additional = ['customSlug' => $slug]; if ($domain !== null) { $e->additional['domain'] = $domain; } return $e; } public static function fromImport(ImportedShlinkUrl $importedUrl): self { return self::fromSlug($importedUrl->shortCode, $importedUrl->domain); } }