agmission/Development/server/apidoc/api_errors.js

98 lines
1.9 KiB
JavaScript

/**
* @apiDefine NotAuthorizedError
*
* @apiError not_authorized The account is not authorized.
*
* @apiErrorExample NotAuthorizedError-Response:
* HTTP/1.1 401 Not Authorised
* {
* "error": {
* ".tag": "not_authorized"
* }
* }
*/
/**
* @apiDefine WrongCredentialError
*
* @apiError wrong_credential Username or password is incorrect.
*
* @apiErrorExample WrongCredentialError-Response:
* HTTP/1.1 409 Conflict
* {
* "error": {
* ".tag": "wrong_credential"
* }
* }
*/
/**
* @apiDefine InActiveAccountError
*
* @apiError inactive The account is existed but was disabled.
*
* @apiErrorExample InActiveAccountErrorError-Response:
* HTTP/1.1 401 Not Authorised
* {
* "error": {
* ".tag": "inactive"
* }
* }
*/
/**
* @apiDefine JobNotFoundError
*
* @apiError job_not_found Job with given Id is not found.
*
* @apiErrorExample JobNotFoundError-Response:
* HTTP/1.1 409 Conflict
* {
* "error": {
* ".tag": "job_not_found"
* }
* }
*/
/**
* @apiDefine JobNotAssignedError
*
* @apiError job_not_assigned Job is not currently assigned to the user. Notes: this error is only applied for aircraft users.
*
* @apiErrorExample JobNotAssignedError-Response:
* HTTP/1.1 409 Conflict
* {
* "error": {
* ".tag": "job_not_assigned"
* }
* }
*/
/**
* @apiDefine JobNoSprayAreaError
*
* @apiError no_spray_area Job is empty or does not have any spray area.
*
* @apiErrorExample JobNoSprayAreaError-Response:
* HTTP/1.1 409 Conflict
* {
* "error": {
* ".tag": "no_spray_area"
* }
* }
*/
/**
* @apiDefine WrongJobFileError
*
* @apiError wrong_job_file The zip file belongs to another job (based on the _id field found within the job.json file).
*
* @apiErrorExample WrongJobFileError-Response:
* HTTP/1.1 409 Conflict
* {
* "error": {
* ".tag": "wrong_job_file"
* }
* }
*/