[DOCS-8680] Add :apierror: interface type Created: 24/Aug/16  Updated: 26/Aug/16  Resolved: 26/Aug/16

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Bob Grabar Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: bite-sized
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 7 years, 24 weeks, 5 days ago
Story Points: 0.25

 Description   

We are documenting the Ops Manager API error codes.
We want to create an API Error Codes page that lists all error codes.
And on each api resource page, we want to list the codes just for that resource.

Could we add an `error` value to the `arg_type` field for apiargs?

Would that work within the intended purpose of apiargs?



 Comments   
Comment by Allison Reinheimer Moore [ 26/Aug/16 ]

Commit: https://github.com/mongodb/docs-tools/commit/b0932339a685dd2471898f5b74099a0c43c19043

Comment by Allison Reinheimer Moore [ 26/Aug/16 ]

The solution!

To Declare:

.. apierror:: errorname
 
   400, description

To link:

:apierror:`errorname`

Comment by Bob Grabar [ 25/Aug/16 ]

After talking with david.golub, we'd like the API Error Codes page to list error codes in a format similar to the Windows System Error Codes:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms681385(v=vs.85).aspx

And we'd like to be able to link to each error code, so that each api endpoint can have a list of possible error codes, all linked back to their definitions on the API Error Codes page.

Currently, I think the best we can do is meet some but not all of those desires, as in the different examples of the INVALID_JSON error here:
https://docs-staging.cloudmanager.mongodb.com/bob/for-writing-1654/reference/api-error-codes.html,

which is built from this rST:

.. _invalid-json:
 
INVALID_JSON
------------
 
    400
 
    Received JSON does not match expected format.
 
INVALID_JSON
  400
 
  Received JSON does not match expected format.
 
INVALID_JSON
  400, Received JSON does not match expected format.

Comment by Bob Grabar [ 24/Aug/16 ]

allison.moore Thanks for catching that. We do need the three fields.

Comment by Allison Reinheimer Moore [ 24/Aug/16 ]

Formatting for the table:

Error | Reason       | Description
------------------------------
400   | INVALID_JSON | Received JSON does not match expected format |

Generated at Thu Feb 08 07:56:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.