mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
debug region validation
This commit is contained in:
parent
f4d2583865
commit
246c334127
1 changed files with 6 additions and 2 deletions
|
|
@ -1348,8 +1348,12 @@ App::setResource('project', function ($dbForPlatform, $request, $console) {
|
|||
$project = Authorization::skip(fn () => $dbForPlatform->getDocument('projects', $projectId));
|
||||
|
||||
if ($project->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) {
|
||||
var_dump(System::getEnv('_APP_REGION'));
|
||||
var_dump($project->getAttribute('region'));
|
||||
var_dump([
|
||||
'projectId' => $project->getId(),
|
||||
'projectRegion' => $project->getAttribute('region'),
|
||||
'_APP_REGION' => System::getEnv('_APP_REGION'),
|
||||
]);
|
||||
|
||||
throw new Exception(Exception::GENERAL_ACCESS_FORBIDDEN, 'Project is not accessible in this region. Please make sure you are using the correct endpoint');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue