forked from scottdware/go-bigip
-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
The Go SDK function PostAs3Bigip does not handle partial success responses correctly.
A partial success response is one where:
- The HTTP status code is 200
- The JSON response payload:
- contains a key
.codeset to207 - contains a key
.results[]where at least one of its entries has a code other than200, such as422
- contains a key
Actual behavior
The function returns a nil error for the following JSON response payload:
{
"results": [
{
"code": 200,
"message": "no change",
"host": "localhost",
"tenant": "Common",
"runTime": 8544,
"declarationId": "autogen_d988ce22-cf5f-46ca-ad3d-a125c8db529e"
},
{
"code": 422,
"message": "declaration failed",
"response": "0107019a:3: Wide IP or alias (my-test-app-01-qa of type A) entered is not a fully qualified domain name or contains invalid characters. Additional character support can be enabled by modifying the Domain Name Check settings.",
"host": "localhost",
"tenant": "domain_7b4e6772-bfb5-11f0-b43e-0a3b97e32b2b",
"runTime": 2983,
"declarationId": "autogen_d988ce22-cf5f-46ca-ad3d-a125c8db529e"
},
{
"code": 200,
"message": "no change",
"host": "localhost",
"tenant": "Common",
"runTime": 3350,
"declarationId": "autogen_d988ce22-cf5f-46ca-ad3d-a125c8db529e"
}
],
"declaration": {
"Common": {
"Shared": {
"cc_andromeda_monitor_fa6cbe48-bfc2-11f0-b43e-0a3b97e32b2b": {
"class": "GSLB_Monitor",
"monitorType": "http",
"interval": 60,
"probeTimeout": 10
},
"cc_andromeda_srv_<redacted>_cc_dc_qa-de-1": {
"class": "GSLB_Server",
"dataCenter": {
"bigip": "/Common/cc_dc_qa-de-1"
},
"devices": [
{
"address": "<redacted>"
}
],
"virtualServers": [
{
"address": "<redacted>",
"name": "<redacted>:80",
"port": 80
}
],
"monitors": [
{
"use": "cc_andromeda_monitor_fa6cbe48-bfc2-11f0-b43e-0a3b97e32b2b"
}
],
"serverType": "generic-host"
},
"cc_andromeda_srv_<redacted>_cc_dc_qa-de-1": {
"class": "GSLB_Server",
"dataCenter": {
"bigip": "/Common/cc_dc_qa-de-1"
},
"devices": [
{
"address": "<redacted>"
}
],
"virtualServers": [
{
"address": "<redacted>",
"name": "<redacted>:80",
"port": 80
}
],
"monitors": [
{
"use": "cc_andromeda_monitor_fa6cbe48-bfc2-11f0-b43e-0a3b97e32b2b"
}
],
"serverType": "generic-host"
},
"class": "Application",
"label": "",
"remark": "",
"template": "shared"
},
"class": "Tenant",
"label": "",
"remark": ""
},
"domain_7b4e6772-bfb5-11f0-b43e-0a3b97e32b2b": {
"application": {
"class": "Application",
"label": "",
"pool_11d419e7-bfc0-11f0-b43e-0a3b97e32b2b": {
"class": "GSLB_Pool",
"resourceRecordType": "A",
"members": [
{
"server": {
"use": "/Common/Shared/cc_andromeda_srv_<redacted>_cc_dc_qa-de-1"
},
"virtualServer": "<redacted>:80"
},
{
"server": {
"use": "/Common/Shared/cc_andromeda_srv_<redacted>_cc_dc_qa-de-1"
},
"virtualServer": "<redacted>:80"
}
],
"lbModePreferred": "round-robin",
"lbModeAlternate": "none",
"lbModeFallback": "none"
},
"remark": "",
"template": "",
"wideip": {
"class": "GSLB_Domain",
"domainName": "my-test-app-01-qa.<redacted>",
"resourceRecordType": "A",
"poolLbMode": "global-availability",
"pools": [
{
"use": "pool_11d419e7-bfc0-11f0-b43e-0a3b97e32b2b"
}
]
}
},
"class": "Tenant",
"label": "",
"remark": ""
},
"class": "ADC",
"id": "autogen_d988ce22-cf5f-46ca-ad3d-a125c8db529e",
"schemaVersion": "3.36.0",
"updateMode": "complete",
"controls": {
"archiveTimestamp": "2025-11-13T14:40:31.546Z"
}
},
"code": 207
}Expected behavior
A .code with value 207 should always be considered an error and for each .results[] entry with a .code other than 200, a debugging message should print the respective entry (all key/value pairs) for convenient debugging.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels