1 Star 0 Fork 0

MorSunChen/janus-gateway

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
apierror.c 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
#include "apierror.h"
const char *janus_get_api_error(int error) {
switch(error) {
case JANUS_OK:
return "Success";
case JANUS_ERROR_UNAUTHORIZED:
return "Unauthorized request (wrong or missing secret/token)";
case JANUS_ERROR_UNAUTHORIZED_PLUGIN:
return "Unauthorized access to plugin (token is not allowed to)";
case JANUS_ERROR_UNKNOWN:
return "Unknown error";
case JANUS_ERROR_TRANSPORT_SPECIFIC:
return "Transport specific error";
case JANUS_ERROR_MISSING_REQUEST:
return "Missing request";
case JANUS_ERROR_UNKNOWN_REQUEST:
return "Unknown request";
case JANUS_ERROR_INVALID_JSON:
return "Invalid JSON";
case JANUS_ERROR_INVALID_JSON_OBJECT:
return "Invalid JSON Object";
case JANUS_ERROR_MISSING_MANDATORY_ELEMENT:
return "Missing mandatory element";
case JANUS_ERROR_INVALID_REQUEST_PATH:
return "Invalid path for this request";
case JANUS_ERROR_SESSION_NOT_FOUND:
return "Session not found";
case JANUS_ERROR_HANDLE_NOT_FOUND:
return "Handle not found";
case JANUS_ERROR_PLUGIN_NOT_FOUND:
return "Plugin not found";
case JANUS_ERROR_PLUGIN_ATTACH:
return "Error attaching plugin";
case JANUS_ERROR_PLUGIN_MESSAGE:
return "Error sending message to plugin";
case JANUS_ERROR_PLUGIN_DETACH:
return "Error detaching from plugin";
case JANUS_ERROR_JSEP_UNKNOWN_TYPE:
return "Unsupported JSEP type";
case JANUS_ERROR_JSEP_INVALID_SDP:
return "Invalid SDP";
case JANUS_ERROR_TRICKE_INVALID_STREAM:
return "Invalid stream";
case JANUS_ERROR_INVALID_ELEMENT_TYPE:
return "Invalid element type";
case JANUS_ERROR_SESSION_CONFLICT:
return "Session ID already in use";
case JANUS_ERROR_UNEXPECTED_ANSWER:
return "Unexpected ANSWER (no OFFER)";
case JANUS_ERROR_TOKEN_NOT_FOUND:
return "Token not found";
case JANUS_ERROR_WEBRTC_STATE:
return "Wrong WebRTC state";
case JANUS_ERROR_NOT_ACCEPTING_SESSIONS:
return "Currently not accepting new sessions";
default:
return "Unknown error";
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/MorsunJacky/janus-gateway.git
git@gitee.com:MorsunJacky/janus-gateway.git
MorsunJacky
janus-gateway
janus-gateway
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385