Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2132

Error code during invalid file path/unreadable file provided during import

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9-incubating
    • Fix Version/s: 0.9-incubating, 0.8.2
    • Component/s: atlas-core
    • Labels:
      None

      Description

      When firing import command using

      /api/atlas/admin/importfile
      

      when file provided in the import_options.json doesn't have read permission or file is not present , Atlas throws 500 Internal server error but with proper error message.

      Example :

      {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: invalid parameters: /exportimport/db5.zip: file not found"}
      
      {"errorCode":"ATLAS-500-00-001","errorMessage":"org.apache.atlas.exception.AtlasBaseException: java.io.IOException: File '/exportimport/db6.zip' cannot be read"}
      

      Expected that Atlas would throw 400 Bad Request instead of 500 Internal Server error.

      1. ATLAS-2132.patch
        1.0 kB
        Péter Gergő Barna
      2. ATLAS-2132-2.patch
        8 kB
        Ashutosh Mestry

        Activity

        Hide
        ashutoshm Ashutosh Mestry added a comment -

        Péter Gergő Barna Can you please open a review request for this?

        Show
        ashutoshm Ashutosh Mestry added a comment - Péter Gergő Barna Can you please open a review request for this?
        Hide
        ashutoshm Ashutosh Mestry added a comment -

        I would prefer the other patch (attached).

        Show
        ashutoshm Ashutosh Mestry added a comment - I would prefer the other patch (attached).
        Hide
        madhan.neethiraj Madhan Neethiraj added a comment -

        +1 for ATLAS-2132-2.patch.

        Show
        madhan.neethiraj Madhan Neethiraj added a comment - +1 for ATLAS-2132 -2.patch.
        Show
        madhan.neethiraj Madhan Neethiraj added a comment - Committed to following branches: master: http://git-wip-us.apache.org/repos/asf/atlas/commit/67c04c63 branch-0.8: http://git-wip-us.apache.org/repos/asf/atlas/commit/1b56bec7

          People

          • Assignee:
            bpgergo Péter Gergő Barna
            Reporter:
            ssainath Sharmadha Sainath
            Request participants:
            None
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: