I\'m using Charles Proxy to rewrite a response from an API for testing purpose.
If I set a breakpoint, I am allowed to completely rewrite the raw response as I wish.
1- Select Tools > Rewrite
or OPTION + CMD + R
2- Select Enable Rewrite
and then select Add
3- Fill the fields with your details
4- Add type and action
5- Select type of action - Response Status
for our case -, write value to be changed -500-, write value for replace -200-
Final Step:
6- You are ready to manipulate status code of your response with Charles
Official site of Charles Web Debugging Proxy