Error while trying to set up co-branding

I keep getting this error while trying to set up co-branding.

Error saving Co-Branding configuration: Error: Request failed with status code 500

What is this error and how do I fix it?

Are there any other errors in the gateway logs around the same time this occurs?