When using HTTP GET to access the WHIP API, the error codes are not accurate. #3838
Labels
good first issue
Easy to fix issues, good for newcomers
TransByAI
Translated by AI/GPT.
WebRTC
WebRTC, RTC2RTMP or RTMP2RTC.
Describe the bug
Normally, users should access the WHIP API using HTTP POST. But sometimes, users might habitually paste the WHIP API into the browser to access it. In this case, the error logs from SRS are not very clear, and there isn't a clear error response either.
Version
SRS 5.0 and 6.0
To Reproduce
Steps to reproduce the behavior:
./objs/srs -c conf/console.conf
curl -v 'http://localhost:1985/rtc/v1/whip/?app=live&stream=livestream'
Expected behavior
SRS should use more specific error codes, instead of the current
now only support BUNDLE
.SRS should return error codes and messages in the HTTP Response.
Additional context
Note: Previously, no error response was returned, primarily for simplicity. Also, when returning a response, sensitive information needs to be avoided. There were many factors to consider, so detailed error messages were not returned.
TRANS_BY_GPT4
The text was updated successfully, but these errors were encountered: