mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-02 04:53:37 +00:00
Include cause in HTTP response ProblemDetails (#3051)
Cause is set according to particular NF standard. Additionally: - OGS_SBI_HTTP_STATUS_MEHTOD_NOT_ALLOWED typo fixed. - [PCF] Fixed SM Policy establishment error handling
This commit is contained in:
@@ -77,7 +77,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_assert(true ==
|
||||
ogs_sbi_server_send_error(
|
||||
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
|
||||
NULL, "cannot parse HTTP sbi_message", NULL));
|
||||
NULL, "cannot parse HTTP sbi_message", NULL, NULL));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_assert(true ==
|
||||
ogs_sbi_server_send_error(
|
||||
stream, OGS_SBI_HTTP_STATUS_BAD_REQUEST,
|
||||
&message, "Not supported version", NULL));
|
||||
&message, "Not supported version", NULL, NULL));
|
||||
ogs_sbi_message_free(&message);
|
||||
break;
|
||||
}
|
||||
@@ -106,7 +106,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_assert(true ==
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_FORBIDDEN, &message,
|
||||
"Invalid HTTP method", message.h.method));
|
||||
"Invalid HTTP method", message.h.method, NULL));
|
||||
END
|
||||
break;
|
||||
|
||||
@@ -117,7 +117,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
|
||||
"Invalid resource name",
|
||||
message.h.resource.component[0]));
|
||||
message.h.resource.component[0], NULL));
|
||||
END
|
||||
break;
|
||||
|
||||
@@ -133,7 +133,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_NOT_FOUND,
|
||||
&message, "Not found",
|
||||
message.h.resource.component[1]));
|
||||
message.h.resource.component[1], NULL));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_NOT_FOUND,
|
||||
&message, "Not found",
|
||||
message.h.resource.component[1]));
|
||||
message.h.resource.component[1], NULL));
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
|
||||
"Invalid resource name",
|
||||
message.h.resource.component[2]));
|
||||
message.h.resource.component[2], NULL));
|
||||
END
|
||||
break;
|
||||
DEFAULT
|
||||
@@ -173,7 +173,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
|
||||
"Invalid resource name",
|
||||
message.h.resource.component[0]));
|
||||
message.h.resource.component[0], NULL));
|
||||
END
|
||||
break;
|
||||
|
||||
@@ -182,7 +182,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_assert(true ==
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_BAD_REQUEST, &message,
|
||||
"Invalid API name", message.h.service.name));
|
||||
"Invalid API name", message.h.service.name, NULL));
|
||||
END
|
||||
|
||||
/* In lib/sbi/server.c, notify_completed() releases 'request' buffer. */
|
||||
@@ -497,7 +497,7 @@ void af_state_operational(ogs_fsm_t *s, af_event_t *e)
|
||||
ogs_assert(true ==
|
||||
ogs_sbi_server_send_error(stream,
|
||||
OGS_SBI_HTTP_STATUS_GATEWAY_TIMEOUT, NULL,
|
||||
"Cannot receive SBI message", NULL));
|
||||
"Cannot receive SBI message", NULL, NULL));
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user