Modify error message on write api

- Conforms to feature test and returns the message `Expected header of form: Authorization: Bearer <token>` for cases where the 'authorization' key can't be found or is malformed