Fix bug #3: Inserting notes on PostgreSQL
[grauphel.git] / lib / response / errorresponse.php
1 <?php
2 namespace OCA\Grauphel\Lib\Response;
3
4 class ErrorResponse extends \OCP\AppFramework\Http\Response
5 {
6     protected $error;
7
8     public function __construct($error)
9     {
10         $this->setStatus(\OCP\AppFramework\Http::STATUS_BAD_REQUEST);
11         $this->addHeader('Content-Type', 'text/plain; charset=utf-8');
12         $this->error = $error;
13     }
14
15     public function render()
16     {
17         return $this->error . "\n";
18     }
19 }
20 ?>