Closed idealhack closed 6 years ago
That may be because the URL you gave the client is for the web UI rather than the API. I no longer have a Synology NAS so can't help diagnose or fix the error unfortunately! Happy to accept a pull request if you figure out a solution :)
Hi, glad to see your reply!
This issue also been reported in thavel/synolopy#10, it only happen to quickconnect hostnames. It seems that better error message is the best we can do for this situation.
I'm closing this because clients can't do many things about it.
This error occurs when I call
syno.NewClient()
.The reason is Synology returns a HTML (sth. like a splash screen) instead of JSON first, this line would fail and return the error.
When I request the same URL in a browser, it will returns a JSON eventually, even though it's 400, maybe there are some mistakes in my parameters.
I'm new to Synology API, can you reproduce this error? Example code are like: