diff --git a/BambooHR/BambooHTTPResponse.php b/BambooHR/BambooHTTPResponse.php index 2665232..840f316 100644 --- a/BambooHR/BambooHTTPResponse.php +++ b/BambooHR/BambooHTTPResponse.php @@ -77,7 +77,7 @@ public function getContent() { */ public function getErrorMessage() { if ($this->isError()) { - return isset($this->headers['X-BambooHR-Error-Messsage']) ? $this->headers['X-BambooHR-Error-Messsage'] : $this->getContent(); + return isset($this->headers['X-BambooHR-Error-Message']) ? $this->headers['X-BambooHR-Error-Message'] : $this->getContent(); } return null; } diff --git a/examples.php b/examples.php index 759679f..89c723d 100644 --- a/examples.php +++ b/examples.php @@ -39,7 +39,7 @@ $fields = array('lastName', 'firstName', 'employeeNumber'); $response = $api->getCustomReport('xml',$fields); if($response->isError()){ - //for many errors, Bamboo will add a header "X-BambooHR-Error-Messsage" that describes the error. These messages are meant for debugging purposes. + //for many errors, Bamboo will add a header "X-BambooHR-Error-Message" that describes the error. These messages are meant for debugging purposes. trigger_error("Problem with custom report: " . $response->getErrorMessage()); } diff --git a/tests/BambooHTTPRequestTest.php b/tests/BambooHTTPRequestTest.php index 943d506..384803e 100644 --- a/tests/BambooHTTPRequestTest.php +++ b/tests/BambooHTTPRequestTest.php @@ -175,7 +175,7 @@ public function testGetErrorMessage() $errorBody = 'Test Body Error'; $response = new BambooHTTPResponse(); - $response->headers['X-BambooHR-Error-Messsage'] = $errorHeader; + $response->headers['X-BambooHR-Error-Message'] = $errorHeader; $response->content = $errorBody; $response->statusCode = 200; $this->assertNull( @@ -183,7 +183,7 @@ public function testGetErrorMessage() ); $response = new BambooHTTPResponse(); - $response->headers['X-BambooHR-Error-Messsage'] = $errorHeader; + $response->headers['X-BambooHR-Error-Message'] = $errorHeader; $response->content = $errorBody; $response->statusCode = 500; $this->assertSame(