directus/v6-archive

http status code 200 on runtimeException

开放

#19 创建于 2018年10月25日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (4 个派生)auto 404
3. MajorAPIhelp wantedv6

仓库指标

星标
 (2 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

From directus created by dlaprade : directus/directus#1985

Version Info

  • Directus version and branch: 6.4.3
  • PHP version: 7.1.11
  • MySQL version: MariaDB 10.1
  • Web server: Apache
  • OS name and version: Debian Jessie Linux

Expected Behavior

If Directus throws a RuntimeException, a status code of 500 should be thrown.

Actual Behavior

When Directus server ran out of hard drive space, a RuntimeException was thrown with a status code of 200.

Error in response

<br />
<b>Warning</b>:  session_start(): open(/tmp/sess_022a205602f9b58f0a8f5d1bae0f01e2, O_RDWR) failed: No space left on device (28) in <b>/var/www/html/api/core/Directus/Session/Storage/NativeSessionStorage.php</b> on line <b>81</b><br />
<br />
<b>Warning</b>:  session_start(): Failed to read session data: files (path: ) in <b>/var/www/html/api/core/Directus/Session/Storage/NativeSessionStorage.php</b> on line <b>81</b><br />
<br />
<b>Fatal error</b>:  Uncaught RuntimeException: Session start failed in /var/www/html/api/core/Directus/Session/Storage/NativeSessionStorage.php:82
Stack trace:
#0 [internal function]: Directus\Session\Storage\NativeSessionStorage-&gt;start()
#1 /var/www/html/api/core/Directus/Session/Session.php(46): call_user_func_array(Array, Array)
#2 /var/www/html/api/core/Directus/Bootstrap.php(230): Directus\Session\Session-&gt;__call('start', Array)
#3 [internal function]: Directus\Bootstrap::app(NULL)
#4 /var/www/html/api/core/Directus/Bootstrap.php(72): call_user_func('Directus\\Bootst...', NULL)
#5 /var/www/html/api/api.php(47): Directus\Bootstrap::get('app')
#6 {main}
  thrown in <b>/var/www/html/api/core/Directus/Session/Storage/NativeSessionStorage.php</b> on line <b>82</b><br />

贡献者指南