Skip to content

Commit

Permalink
Update in finisher status
Browse files Browse the repository at this point in the history
  • Loading branch information
lecid committed May 2, 2024
1 parent f0d1f6e commit 28b4479
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,34 +622,37 @@ titi
- key : a I18n service key in locales files (Carioca internals locales) see https://github.com/Ultragreen/carioca/tree/master/config/locales

```ruby
# global
not_root: { code: 40, key: 'finisher.messages.not_root' },
options_incompatibility: { code: 410, key: 'finisher.messages.options_incompatibility'},
service_dependence_missing: { code: 430, key: 'finisher.messages.service_dependence_missing'},
config_required: { code: 420, key: 'finisher.messages.config_required'},
setup_error: { code: 520, key: 'finisher.messages.setup_error'},
setup_success: { code: 0, key: 'finisher.messages.setup_success'},
sanitycheck_error: { code: 510, key: 'finisher.messages.sanitycheck_error'},
sanitycheck_success: { code: 0, key: 'finisher.messages.sanitycheck_success'},
configuration_error: { code: 501, key: 'finisher.messages.configuration_error'},
success_exit: { code: 0, key: 'finisher.messages.success_exit' },
quiet_exit: { code: 0 },
error_exit: { code: 50, key: 'finisher.messages.error_exit' },

# events
interrupt: { code: 330, key: 'finisher.messages.interrupt' },

# request & API
not_found: { code: 404, key: 'finisher.messages.not_found' },
already_exist: { code: 408, key: 'finisher.messages.already_exist' },

# daemon & API
status_ok: { code: 200, key: 'finisher.messages.status_ok' },
created: { code: 201, key: 'finisher.messages.created' },
accepted: { code: 202, key: 'finisher.messages.accepted' },
bad_request: { code: 400, key: 'finisher.messages.bad_request' },
status_ko: { code: 500, key: 'finisher.messages.status_ko' },
no_content: { code: 204, key: 'finisher.messages.no_content' },
DEFAULT_FINISHERS_SPECS = {
# global
not_root: { code: 40, key: 'finisher.messages.not_root' },
options_incompatibility: { code: 410, key: 'finisher.messages.options_incompatibility' },
missing_service_dependency: { code: 430, key: 'finisher.messages.missing_service_dependency' },
config_required: { code: 420, key: 'finisher.messages.config_required' },
setup_error: { code: 520, key: 'finisher.messages.setup_error' },
setup_success: { code: 0, key: 'finisher.messages.setup_success' },
sanitycheck_error: { code: 510, key: 'finisher.messages.sanitycheck_error' },
sanitycheck_success: { code: 0, key: 'finisher.messages.sanitycheck_success' },
configuration_error: { code: 501, key: 'finisher.messages.configuration_error' },
success_exit: { code: 0, key: 'finisher.messages.success_exit' },
quiet_exit: { code: 0 },
error_exit: { code: 50, key: 'finisher.messages.error_exit' },

# events
interrupt: { code: 330, key: 'finisher.messages.interrupt' },

# request & API
not_found: { code: 404, key: 'finisher.messages.not_found' },
already_exist: { code: 408, key: 'finisher.messages.already_exist' },

# daemon & API
status_ok: { code: 200, key: 'finisher.messages.status_ok' },
created: { code: 201, key: 'finisher.messages.created' },
accepted: { code: 202, key: 'finisher.messages.accepted' },
bad_request: { code: 400, key: 'finisher.messages.bad_request' },
status_ko: { code: 500, key: 'finisher.messages.status_ko' },
no_content: { code: 204, key: 'finisher.messages.no_content' },
not_implemented: { code: 210, key: 'finisher.messages.not_implemented' },
}
```

This returns must be override from Config File (using Builtin Configuration Service) inbluding a key exit_cases:
Expand Down

0 comments on commit 28b4479

Please sign in to comment.