Fall back to path for write api errors

Use the request path instead of the bucket name for errors if the bucket
name has not been set.

@maxfliri
@robyoung