-
Proposal:
Hide
Tie down a core set of return codes with MUST conditions in the spec narrative so that it's clear when a return code is used. Implementers can then code around these.
Some flexibility is required where a set of error conditions happen at the same time or where the implementation wishes to be vague for security reasons.
Show
Tie down a core set of return codes with MUST conditions in the spec narrative so that it's clear when a return code is used. Implementers can then code around these.
Some flexibility is required where a set of error conditions happen at the same time or where the implementation wishes to be vague for security reasons.
-
There are a number of places in the spec where we associate return codes to error conditions but don't go as far as to make it a MUST condition.
For example:
A Topic Alias value of 0 or greater than the Maximum Topic Alias is a protocol error, the receiver uses DISCONNECT with Return Code of 0x94 (Topic Alias invalid) as described in section 4.13.
It's not clear what would happen if the receiver didn't use 0x94, would that still be a conformant implementation ?
In other places we define an appropriate return code around the boundary of 128 (pick a code ...less than or greater than).
Some of the codes listed in the tables are not referenced in the narrative. As such it's up to the implementer to evaluate and pick the best the code and for a given condition. One concern is that this could lead to implementers making different decisions and, as a result, writing code to handle certain conditions may or may not get triggered depending on the client:server pairing.
One approach is to view the codes more generally e.g., <128 is OK >=128 is bad, but this doesn't seem to improve much on what's gone before.
{"report":{"apdex":0.5,"isInitial":true,"journeyId":"09ae9cd5-6258-411d-b6f5-7fa4a8fa9836","key":"jira.project.issue.view-issue","navigationType":0,"readyForUser":3176.5999999046326,"redirectCount":0,"resourceLoadedEnd":3984.0999999046326,"resourceLoadedStart":233.7999997138977,"resourceTiming":[{"duration":642.1000003814697,"initiatorType":"link","name":"https://issues.oasis-open.org/s/3edeca31ab9ba77980aae0809fbe7121-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/css/_super/batch.css","startTime":233.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":233.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":875.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":694.9000000953674,"initiatorType":"link","name":"https://issues.oasis-open.org/s/7d2823769c2e7b66e860863fe879b7f8-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/css/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&richediton=true","startTime":234.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":929.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":710.5,"initiatorType":"link","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.css","startTime":234.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":945.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":711.3000001907349,"initiatorType":"link","name":"https://issues.oasis-open.org/s/645acc233eb869f48a571293b8358a7d-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static-adgs/jira.webresources:global-static-adgs.css","startTime":234.7999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":234.7999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":946.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":711.5999999046326,"initiatorType":"link","name":"https://issues.oasis-open.org/s/a0dd6509771c1de0667aae5429c04cda-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:global-static/jira.webresources:global-static.css","startTime":235.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":235.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":946.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":1058.4000000953674,"initiatorType":"script","name":"https://issues.oasis-open.org/s/e5479157e7a0c08b005e6522f2f04104-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/0a4716d29b2d5b1bdcdb168b4efc119e/_/download/contextbatch/js/_super/batch.js?locale=en-US","startTime":235.69999980926514,"connectEnd":1081.2999997138977,"connectStart":1031.5,"domainLookupEnd":1031.5,"domainLookupStart":1031.5,"fetchStart":235.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1081.4000000953674,"responseEnd":1294.0999999046326,"responseStart":1122.5,"secureConnectionStart":1056.1999998092651},{"duration":2743.3999996185303,"initiatorType":"script","name":"https://issues.oasis-open.org/s/83514d5d4e8543747b02042eafcdc99c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/9aebb1c0aaa4c36289529757ec9dbb54/_/download/contextbatch/js/project.issue.navigator,jira.view.issue,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":236.40000009536743,"connectEnd":1135.9000000953674,"connectStart":1086.2999997138977,"domainLookupEnd":1086.2999997138977,"domainLookupStart":1086.2999997138977,"fetchStart":236.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1135.9000000953674,"responseEnd":2979.7999997138977,"responseStart":1164.2999997138977,"secureConnectionStart":1110.6999998092651},{"duration":1087.0999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/s/70bb2263e59e7e1f04fbd137c80b895b-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/aae1242f5fc81cc6a5bb8bc963ccda29/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en-US","startTime":236.59999990463257,"connectEnd":1294.9000000953674,"connectStart":1244.7999997138977,"domainLookupEnd":1244.7999997138977,"domainLookupStart":1244.7999997138977,"fetchStart":236.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":1295,"responseEnd":1323.6999998092651,"responseStart":1322.1999998092651,"secureConnectionStart":1269.2999997138977},{"duration":1136,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":236.69999980926514,"connectEnd":1344.7999997138977,"connectStart":1293.9000000953674,"domainLookupEnd":1293.9000000953674,"domainLookupStart":1293.9000000953674,"fetchStart":236.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":1344.9000000953674,"responseEnd":1372.6999998092651,"responseStart":1371.9000000953674,"secureConnectionStart":1319.4000000953674},{"duration":1163.6999998092651,"initiatorType":"script","name":"https://issues.oasis-open.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":237,"connectEnd":1373.1999998092651,"connectStart":1323.5,"domainLookupEnd":1323.5,"domainLookupStart":1323.5,"fetchStart":237,"redirectEnd":0,"redirectStart":0,"requestStart":1373.6999998092651,"responseEnd":1400.6999998092651,"responseStart":1399.7999997138977,"secureConnectionStart":1348.0999999046326},{"duration":1216.6999998092651,"initiatorType":"script","name":"https://issues.oasis-open.org/s/cda37faab827dbdf305de8efe8282062-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/8.0.5/_/download/batch/com.atlassian.auiplugin:split_aui.pattern.label/com.atlassian.auiplugin:split_aui.pattern.label.js?locale=en-US","startTime":237.09999990463257,"connectEnd":1422.4000000953674,"connectStart":1372.5999999046326,"domainLookupEnd":1372.5999999046326,"domainLookupStart":1372.5999999046326,"fetchStart":237.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":1422.5,"responseEnd":1453.7999997138977,"responseStart":1451.6999998092651,"secureConnectionStart":1397.1999998092651},{"duration":765.3000001907349,"initiatorType":"link","name":"https://issues.oasis-open.org/s/07245784f53abc49bad9d9d4d36c577a-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/cadc4f20cc5c138dee060d42cf85f220/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":237.2999997138977,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":237.2999997138977,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1002.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":1244.6999998092651,"initiatorType":"script","name":"https://issues.oasis-open.org/rest/api/1.0/shortcuts/803004/a29179d70fa8562374ee16707692af77/shortcuts.js?context=issuenavigation&context=issueaction","startTime":237.5,"connectEnd":1453,"connectStart":1400.5,"domainLookupEnd":1400.5,"domainLookupStart":1400.5,"fetchStart":237.5,"redirectEnd":0,"redirectStart":0,"requestStart":1454.0999999046326,"responseEnd":1482.1999998092651,"responseStart":1481.2999997138977,"secureConnectionStart":1425.1999998092651},{"duration":1140.7999997138977,"initiatorType":"link","name":"https://issues.oasis-open.org/s/f77fd89aa211a76b20e9b0e63564383c-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.css?jira.create.linked.issue=true&richediton=true","startTime":277,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":277,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1417.7999997138977,"responseStart":0,"secureConnectionStart":0},{"duration":2183.5999999046326,"initiatorType":"script","name":"https://issues.oasis-open.org/s/41525c48ddceeb9b11e54085268fc285-CDN/nu8zej/803004/aeedb5937bed650f2f0cc4ec9ceaa5d3/4a9288299d147101bf66484f4be48925/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-jira.view.issue,-project.issue.navigator/batch.js?jira.create.linked.issue=true&locale=en-US&richediton=true","startTime":277.19999980926514,"connectEnd":2429.699999809265,"connectStart":2379.5,"domainLookupEnd":2379.5,"domainLookupStart":2379.4000000953674,"fetchStart":277.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":2429.7999997138977,"responseEnd":2460.7999997138977,"responseStart":2460,"secureConnectionStart":2404.4000000953674},{"duration":1249.5,"initiatorType":"xmlhttprequest","name":"https://issues.oasis-open.org/rest/webResources/1.0/resources","startTime":1426.1999998092651,"connectEnd":2643.5,"connectStart":2592.0999999046326,"domainLookupEnd":2592.0999999046326,"domainLookupStart":2592.0999999046326,"fetchStart":1426.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":2643.5999999046326,"responseEnd":2675.699999809265,"responseStart":2674.4000000953674,"secureConnectionStart":2618.199999809265}],"threshold":1000,"fetchStart":0,"domainLookupStart":29,"domainLookupEnd":60,"connectStart":60,"connectEnd":143,"secureConnectionStart":85,"requestStart":143,"responseStart":222,"responseEnd":308,"domLoading":228,"domInteractive":4003,"domContentLoadedEventStart":4003,"domContentLoadedEventEnd":4053,"domComplete":5656,"loadEventStart":5656,"loadEventEnd":5659,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[],"measures":[],"correlationId":"846f4c72fb292","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":131,"dbReadsTimeInMs":27,"dbConnsTimeInMs":39,"applicationHash":"4d4040e0714d65b7fffa4801569d014c0b16eaa9","experiments":[]}}
The problem with having a MUST about the return code is that sending the CONNACK or DISCONNECT it itself only a SHOULD or MAY.
The other issue is that in any case where there are multiple errors, we say that the implementation gets to choose which to use as the return code. We also allow implementations to send errors in otherwise valid case for exceeding some authorization or implementation constraint.
The only MUST which we have in this area is that the client or server MUST use one of the return codes documented for the control packet they are sending.