Skip to content

💻 [API] Generalise error response #264

@neel1996

Description

@neel1996

Summary

The error response sent from the API is currently not following a common model. This will become a challenge to contextualise the error message or notifications shown to the user in the UI.

A common error response model needs to be introduced to pass an unique code for the error and a message describing the error to the user

Scope of the issue

To introduce a new error response model and use it across the existing controllers

Proposed model

{
    errorCode: "MOCK_IS_DUPLICATE",
    errorMessage: "The mock you are trying to add already exists"
}

Impacted area

  • UI
  • Backend

Supporting artifacts

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions