directus/v6-archive

http status code 200 on runtimeException

Open

#19 opened on Oct 25, 2018

 (0 comments) (0 reactions) (0 assignees)JavaScript (4 forks)auto 404
3. MajorAPIhelp wantedv6

Repository metrics

Stars
 (2 stars)
PR merge metrics
 (PR metrics pending)

Description

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 />

Contributor guide