Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status codes provide extra information when a request is made to the MTAPI. The response code will be provided when a request has been successfully completed.

...

Response Headers
{
"cache-control": "no-cache",
"content-length": "123",
"content-type": "application/json; charset=utf-8",
"date": "Tue, 20 Apr 2021 11:28:03 GMT",
"expires": "-1",
"mtapistatus": "-1",
"pragma": "no-cache",
"server": "Microsoft-IIS/8.5",
"x-aspnet-version": "4.0.30319",
"x-powered-by": "ASP.NET"
}

...

  • InternalError = 901000 // instead of disclosing details, this error may be used

  • MtapiSettingError = 901001 // instead of disclosing details, this error may be used

  • ArgumentError = 901002, // use this status code for argument related errors where the app used to throw "ArgumentException", where error handler logs error however return a bad request to the caller

  • EnrollmentInServiceRequired = 901003 Enrollment in service required// use this status code if an operation cannot be performed because it requires users to be enrolled in a service

App Controller (603000 - 603999)

...