Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • E ErrorNot
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 14
    • Issues 14
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • ErrorNot
  • Wiki
  • API informations

Last edited by shingara Sep 13, 2010
Page history

API informations

All errors are made by a POST request. This request made on url : /errors/

Parameters

To this url you can define this parameters :

  • ‘api-key’
  • ‘version’
  • ‘error’
    • ‘message’
    • ‘raised_at’
    • ‘backtrace’
    • ‘request’
    • ‘environment’
    • ‘data’

Mandatory

Are mandatory only :

  • ‘raised_at’
  • ‘message’

Format

All data are String, but can be Array or Hash too. The list of format are :

  • ‘api-key’ => STRING, the api-key of project
  • ‘version’ => STRING, actually 0.1.0 but can change in future.
  • ‘error’ => HASH, it’s an hash with all information about error raised, all keys are define like after
    • ‘raised_at’ => STRING, date with error is raised in application, use UTC date
    • ‘backtrace’ => Array, it’s a list of string where each string is a line of backtrace
    • ‘request’ => Hash, All information about request
    • ‘environment’ => Hash, All information about environment where error raised
    • ‘data’ => Hash, What you want.

Exemple of Hash send by POST

{'api_key' => "123e435",
    'version' => '0.1.0',
    'error' => {'message' => 'Mongo::OperationFailure: Invalid dbref/code/string/symbol size',
      'raised_at' => '2008-07-09T20:06:44-07:00',
      'backtrace' =>["[GEM_ROOT]/gems/mongo-0.18.3/lib/../lib/mongo/cursor.rb:73:in `next_document'",
                            "[GEM_ROOT]/gems/mongo-0.18.3/lib/../lib/mongo/db.rb:395:in `command'",
                            "[GEM_ROOT]/gems/mongo-0.18.3/lib/../lib/mongo/cursor.rb:95:in `count'",
                            "[GEM_ROOT]/gems/mongo_mapper-0.7.0/lib/mongo_mapper/document.rb:106:in `"],
      'request' => {
        'rails_root' => '/path/to/project',
        'url' => 'http://localhost/failure?id=123',
        'params' => {
          'action' => 'index',
          'id' => '123',
          'controller' => 'groups'}},
      'environment' => {
        'SERVER_NAME' => 'localhost',
        'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
        'HTTP_USER_AGENT' => 'Mozilla/5.0',
        'PATH_INFO' =>  '/',
        'HTTP_ACCEPT_LANGUAGE' => 'en-us,en;q=0.5',
        'HTTP_HOST' => 'localhost'},
      'data' => {}}}

Parameters

Parameters of you request is define in key [‘request’][‘params’]

URL

The url is send by key [‘request’][‘url’]

Return information

  • If the post works a HTTP code 200 is returned.
  • If the post has some error on his formatting, the return HTTP code is 422. An Array of all errors reported are send in body.
  • If the API is unknow or malformed, the HTTP code is 404
Clone repository
  • API informations
  • Home