Skip to content

refactor: restructure parse spectra response and improve logging#107

Merged
NishaSharma14 merged 1 commit intodevelopmentfrom
improve-parse-spectra-logs
Feb 25, 2026
Merged

refactor: restructure parse spectra response and improve logging#107
NishaSharma14 merged 1 commit intodevelopmentfrom
improve-parse-spectra-logs

Conversation

@hamed-musallam
Copy link
Collaborator

We did further modifications to the response object structure for the parse-spectra API.
Currently, the response includes an errors field which, as the name suggests, only captures error-level messages. However, the goal is to extend this to capture all log levels, including info, warn, error, debug, etc., so that API users have full visibility into what happened during the parsing process, not just when something went wrong.

To achieve this, we need to:

  1. Rename errors to logs
  2. Wrap data and version inside an nmriumState object

Updated Response Structure:

{
  "nmriumState": {
    "data": {},
    "version": <version number>
  },
  "images": {},
  "logs": []
}

Wrap `data` and `version` under `nmriumState`, and rename `errors` to `logs`
to capture all log levels (info, warn, error, debug, ...etc) instead of errors only.
@hamed-musallam hamed-musallam force-pushed the improve-parse-spectra-logs branch 2 times, most recently from 393643e to 1ca10bd Compare February 25, 2026 10:07
@NishaSharma14 NishaSharma14 merged commit 324dd83 into development Feb 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants