updated post method to properly handle the 201 error code that signifes 'object created' and the 401 code that indicates insufficient scope permissions