Skip to content

Commit

Permalink
Renamed domain names
Browse files Browse the repository at this point in the history
  • Loading branch information
mikadamczyk committed Sep 5, 2023
1 parent e10b472 commit 29d5bf0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
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

0 comments on commit 29d5bf0

Please sign in to comment.