title: Google Cloud Storage 500 Internal Server Error
body: <p><strong>SettingsController.php</strong>:
          
  
  <pre><code>    namespace App\Controllers;
  
      use Google\Cloud\Storage\StorageClient;
  
      class SettingsController extends Controller {
  
          public function createBucket($request, $response) {
              $projectId = 'myProjectId'; //here I specified my projectId 
  
              $storage = new StorageClient([
                  'projectId' =&gt; $projectId
              ]);
  
              $bucketName = 'socnetfilestestkekdsfa213kfh34';
              $bucket = $storage-&gt;createBucket($bucketName);
          }
       }
  </code></pre>
  
  <p>So, I wrote this code in accordance with documentation, but I'm always getting 500 Network Error.</p>
  
  <p>This is my <strong>index.php</strong>:</p>
  
  <pre><code>&lt;?php
  require __DIR__ . '/../vendor/autoload.php';
  require __DIR__ . '/../config/db.php';
  
  $app = new \Slim\App(['settings' =&gt; $config]);
  
  require __DIR__ . '/../app/dependencies.php';
  require __DIR__ . '/../app/routes.php';
  
  $app-&gt;run();
  </code></pre>
  
  <p>And this is my project structure:</p>
  
  <p><a href="https://i.stack.imgur.com/vRKx4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vRKx4.png" alt="backend project structure"></a></p>