PM-1752 "16829 Si el workspace esta mal escrito al llamar..." SOLVED
Issue:
16829 Si el workspace esta mal escrito al llamar a un endpoint, el estado HTTP es 503
Cause:
No se esta creando un mensaje valido de respuesta (mensaje Restler) de error
Solution:
Se a definido un objeto Restler para generar el error
This commit is contained in:
@@ -480,15 +480,21 @@ class WebApplication
|
|||||||
define("PATH_TEMPORAL", PATH_C . "dynEditor/");
|
define("PATH_TEMPORAL", PATH_C . "dynEditor/");
|
||||||
define("PATH_DB", PATH_DATA . "sites" . PATH_SEP);
|
define("PATH_DB", PATH_DATA . "sites" . PATH_SEP);
|
||||||
|
|
||||||
|
\Bootstrap::LoadTranslationObject((defined("SYS_LANG"))? SYS_LANG : "en");
|
||||||
|
|
||||||
if (empty($workspace)) {
|
if (empty($workspace)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
define("SYS_SYS", $workspace);
|
define("SYS_SYS", $workspace);
|
||||||
|
|
||||||
if (! file_exists( PATH_DB . SYS_SYS . "/db.php" )) {
|
if (!file_exists(PATH_DB . SYS_SYS . PATH_SEP . "db.php")) {
|
||||||
throw new \Exception(\G::loadTranslation("ID_NOT_WORKSPACE"));
|
$rest = new \Maveriks\Extension\Restler();
|
||||||
|
$rest->setMessage(new RestException(Api::STAT_APP_EXCEPTION, \G::LoadTranslation("ID_NOT_WORKSPACE")));
|
||||||
|
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once (PATH_DB . SYS_SYS . "/db.php");
|
require_once (PATH_DB . SYS_SYS . "/db.php");
|
||||||
|
|
||||||
// defining constant for workspace shared directory
|
// defining constant for workspace shared directory
|
||||||
@@ -546,8 +552,6 @@ class WebApplication
|
|||||||
|
|
||||||
\Propel::init(PATH_CONFIG . "databases.php");
|
\Propel::init(PATH_CONFIG . "databases.php");
|
||||||
|
|
||||||
\Bootstrap::LoadTranslationObject(defined( 'SYS_LANG' ) ? SYS_LANG : "en");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user