If you have been at your job for over 6 months and can prove that work has caused you stress and that it is disabling, you may have a claim for workers' compensation benefits.
Your options are very limited if you don't have an employment contract or a union agreement. The law prohibits unlawful discrimination, but personal dislike and animosity are not unlawful. Unlawful usually pertains to discrimination based on race, religion, national origin, etc. It is a sad fact that rude and disrespectful and even unkindness are not unlawful in the workplace, and under California law employees can be terminated even for erroneous reasons. If you don't think you can turn this situation around, you need to start looking to land elsewhere. I'm very sorry for such bleak news.
No legal advice here. READ THIS BEFORE you contact me! My responses to questions on Avvo are never intended as legal advice and must not be relied upon as if they were legal advice. I give legal advice ONLY in the course of a formal attorney-client relationship. Exchange of information through Avvo's Questions forum does not establish an attorney-client relationship with me. That relationship is established only by joint execution of a written agreement for legal services. My law firm does not provide free consultations. Please do not call or write to me with a “few questions” that require me to analyze the specific facts of your history and your license application and prescribe for you how to get a State license. Send me an email to schedule a paid Consultation for that kind of information, direction, and assistance. My law firm presently accepts cases involving State and federal licenses and permits; discipline against State and federal licenses; and disciplinary and academic challenges to universities, colleges, boarding schools, and private schools. We take cases of wrongful termination or employment discrimination only if the claims involve peace officers, universities or colleges.
Your employer would only be liable if it failed to take action to protect your from illegal discrimination or harassment based upon race, religion, gender, sexual orientation, military service, disability, etc. or retaliation for opposing illegal conduct. However, you have not provided any facts that indicate the supervisors bad behavior is motivated by illegal discrimination.
You may wish speak to human resources about the situation, especially if person who overhead the the rude and condescending remarks will support you, and request to be transferred to work under other developers or begin looking for another job.