Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-6415: Renamed domain names #72

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function visit(Visitor $visitor, Generator $generator, $data)
/** @Ignore */
$this->translationToString($translation),
$translation->values,
'repository_exceptions'
'ibexa_repository_exceptions'
)
);

Expand Down
6 changes: 4 additions & 2 deletions src/lib/Server/Output/ValueObjectVisitor/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
use Ibexa\Contracts\Rest\Output\ValueObjectVisitor;
use Ibexa\Contracts\Rest\Output\Visitor;
use Ibexa\Core\Base\Translatable;
use JMS\TranslationBundle\Annotation\Desc;
use JMS\TranslationBundle\Annotation\Ignore;
use Symfony\Contracts\Translation\TranslatorInterface;

/**
Expand Down Expand Up @@ -114,12 +116,12 @@ public function visit(Visitor $visitor, Generator $generator, $data)

if ($this->debug || $statusCode < 500) {
$errorDescription = $data instanceof Translatable && $this->translator
? /** @Ignore */ $this->translator->trans($data->getMessageTemplate(), $data->getParameters(), 'repository_exceptions')
? /** @Ignore */ $this->translator->trans($data->getMessageTemplate(), $data->getParameters(), 'ibexa_repository_exceptions')
: $data->getMessage();
} else {
// Do not leak any file paths and sensitive data on production environments
$errorDescription = $this->translator
? /** @Desc("An error has occurred. Please try again later or contact your Administrator.") */ $this->translator->trans('non_verbose_error', [], 'repository_exceptions')
? /** @Desc("An error has occurred. Please try again later or contact your Administrator.") */ $this->translator->trans('non_verbose_error', [], 'ibexa_repository_exceptions')
: 'An error has occurred. Please try again later or contact your Administrator.';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testVisit()
public function testVisitNonVerbose(): string
{
$this->getTranslatorMock()->method('trans')
->with('non_verbose_error', [], 'repository_exceptions')
->with('non_verbose_error', [], 'ibexa_repository_exceptions')
->willReturn(self::NON_VERBOSE_ERROR_DESCRIPTION);

$visitor = $this->internalGetNonDebugVisitor();
Expand Down
Loading