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

Zms 90 #503

Merged
merged 9 commits into from
Sep 28, 2023
Merged

Zms 90 #503

merged 9 commits into from
Sep 28, 2023

Conversation

NickOvt
Copy link
Contributor

@NickOvt NickOvt commented Sep 22, 2023

  1. Create, Update, Delete functions in mailboxes-handler.js updated to have better and more informative error output
  2. Tests updated accordingly
  3. mailboxes.js API file also updated and unnecessary parts are removed

@NickOvt
Copy link
Contributor Author

NickOvt commented Sep 22, 2023

IMAP Protocol integration tests
       CREATE
         should create new mailbox:
         
        Uncaught AssertionError: expected false to be true
        + expected - actual

        -false
        +true

This test seems to fail for some reason now, will investigate.
My idea is that probably because I changed the status codes (the wording) in the mailboxes-handler.js this test fails.

@andris9
Copy link
Member

andris9 commented Sep 22, 2023

IMAP Protocol integration tests
       CREATE
         should create new mailbox:
         
        Uncaught AssertionError: expected false to be true
        + expected - actual

        -false
        +true

This test seems to fail for some reason now, will investigate. My idea is that probably because I changed the status codes (the wording) in the mailboxes-handler.js this test fails.

Uppercase error codes are special IMAP responses, and these must stay the same. Not sure what to do with these. Maybe create some kind of wrapper that normalizes IMAP error codes for more readable codes for the API responses 🤔

…andler error codes and http status response codes, fix tests
@NickOvt
Copy link
Contributor Author

NickOvt commented Sep 26, 2023

in file imap-core/lib/commands/create.js the function create always returns TEMPFAIL instead of the fail returned by the server, thus the given test fails. Any ideas on fix? If TEMPFAIL error response needs to stay then we can change the test appropriately OR make it that create returns the err.code

@NickOvt
Copy link
Contributor Author

NickOvt commented Sep 28, 2023

Also fixed imap-core create function so it returns correct error instead of hardcoded TEMPFAIL value

lib/mailbox-handler.js Outdated Show resolved Hide resolved
@andris9 andris9 merged commit e43ba60 into master Sep 28, 2023
7 checks passed
@andris9 andris9 deleted the ZMS-90 branch September 28, 2023 09:44
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