ACI docs: Add a section about common error messages (#36088)

Since we pass information directly to ACI, we sometimes get error messages back to the user that require some additional information or context.

This PR includes:
- Changes to the default error output so the error is easier to find
  when searching in e.g. Google
- 3 specific error messages that we have encountered and has confused
  our users before
This commit is contained in:
Dag Wieers 2018-02-13 03:13:08 +01:00 committed by GitHub
parent 1f80361bf9
commit 218f008dab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 6 deletions

View file

@ -380,7 +380,7 @@ class ACIModule(object):
try:
# APIC error
self.response_json(info['body'])
self.fail_json(msg='Request failed: %(code)s %(text)s' % self.error)
self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
except KeyError:
# Connection error
self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
@ -416,7 +416,7 @@ class ACIModule(object):
try:
# APIC error
self.response_json(query['body'])
self.fail_json(msg='Query failed: %(code)s %(text)s' % self.error)
self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
except KeyError:
# Connection error
self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % query)
@ -687,7 +687,7 @@ class ACIModule(object):
try:
# APIC error
self.response_json(info['body'])
self.fail_json(msg='Request failed: %(code)s %(text)s' % self.error)
self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
except KeyError:
# Connection error
self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
@ -820,7 +820,7 @@ class ACIModule(object):
try:
# APIC error
self.response_json(info['body'])
self.fail_json(msg='Request failed: %(code)s %(text)s' % self.error)
self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
except KeyError:
# Connection error
self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)
@ -920,7 +920,7 @@ class ACIModule(object):
try:
# APIC error
self.response_json(info['body'])
self.fail_json(msg='Request failed: %(code)s %(text)s' % self.error)
self.fail_json(msg='APIC Error %(code)s: %(text)s' % self.error)
except KeyError:
# Connection error
self.fail_json(msg='Connection failed for %(url)s. %(msg)s' % info)