Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HttpException::format() method #34

Merged
merged 1 commit into from Jul 26, 2017
Merged

Improve HttpException::format() method #34

merged 1 commit into from Jul 26, 2017

Conversation

zelenomodrypes
Copy link
Contributor

When you get following error response, it will just log #111 (G) Wrong value., so you don`t know what is actually wrong:

{
    "date_issued": "2017-07-14T15:23:28.691+0200",
    "errors": [
        {
            "scope": "G",
            "error_code": 111,
            "error_name": "INVALID",
            "message": "Wrong value.",
            "description": "eshop with goId=1234567890 was not found"
        }
    ]
}

This little improvement makes logged errors more clearer, so next time you will get this:

#111 (G) Wrong value: eshop with goId=1234567890 was not found

@f3l1x
Copy link
Member

f3l1x commented Jul 14, 2017

@zelenomodrypes Oh, that's cool.

I was thinking about special method for each error code, what do you think? :-)

@zelenomodrypes
Copy link
Contributor Author

@f3l1x IMHO it's not necessary, I'd rather improve formatting. Or how would the methods be different? :-)

@f3l1x f3l1x merged commit 74bdd47 into contributte:master Jul 26, 2017
@f3l1x
Copy link
Member

f3l1x commented Jul 26, 2017

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants