mirror of
https://github.com/versity/versitygw.git
synced 2026-01-09 04:53:10 +00:00
Fixes #965 Changes the returned error description to `Policies must be valid JSON and the first byte must be '{'` for invalid bucket policy json documents, which doesn't start with `{`. The gateway returns `This policy contains invalid Json` error description, if the document starts with `{`, but still isn't valid json. Implements the `policyErr` string type which implements the `error` interface, to handle the policy json document validation errors, by avoiding staticchecker warnings.